diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/client.sh | 4 | ||||
-rwxr-xr-x | scripts/generate-code-contributors.ts | 8 | ||||
-rwxr-xr-x | scripts/i18n/pull-hook.sh | 9 | ||||
-rwxr-xr-x | scripts/travis.sh | 8 |
4 files changed, 17 insertions, 12 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index be3eef802..d409d0594 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -41,7 +41,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then | |||
41 | languages=("fr_FR") | 41 | languages=("fr_FR") |
42 | else | 42 | else |
43 | # Supported languages | 43 | # Supported languages |
44 | languages=("pl_PL" "it_IT" "ru_RU" "fr_FR" "pt_BR" "sv_SE" "eu_ES" "ca_ES" "cs_CZ" "eo" "zh_Hant_TW" "de_DE" "es_ES" "oc" "zh_Hans_CN") | 44 | languages=("nl_NL" "es_ES" "oc" "pt_BR" "pt_PT" "sv_SE" "pl_PL" "ru_RU" "zh_Hans_CN" "zh_Hant_TW" "fr_FR" "ja_JP" "eu_ES" "ca_ES" "cs_CZ" "eo" "de_DE" "it_IT") |
45 | fi | 45 | fi |
46 | 46 | ||
47 | for lang in "${languages[@]}"; do | 47 | for lang in "${languages[@]}"; do |
@@ -51,7 +51,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then | |||
51 | npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ | 51 | npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ |
52 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" | 52 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" |
53 | 53 | ||
54 | # Do no duplicate assets | 54 | # Do not duplicate assets |
55 | rm -r "./dist/$lang/assets" | 55 | rm -r "./dist/$lang/assets" |
56 | 56 | ||
57 | # TODO: remove when the project will use runtime translations | 57 | # TODO: remove when the project will use runtime translations |
diff --git a/scripts/generate-code-contributors.ts b/scripts/generate-code-contributors.ts index 96110307a..0d6266056 100755 --- a/scripts/generate-code-contributors.ts +++ b/scripts/generate-code-contributors.ts | |||
@@ -35,8 +35,12 @@ async function run () { | |||
35 | 35 | ||
36 | { | 36 | { |
37 | console.log('\n\n# Design\n') | 37 | console.log('\n\n# Design\n') |
38 | console.log('By [Olivier Massain](https://twitter.com/omassain)\n') | 38 | console.log(' * [Olivier Massain](https://twitter.com/omassain)') |
39 | console.log('Icons from [Robbie Pearce](https://robbiepearce.com/softies/)') | 39 | |
40 | console.log('\n\n# Icons\n') | ||
41 | console.log(' * [Robbie Pearce](https://robbiepearce.com/softies/)') | ||
42 | console.log(' * [Fork-Awesome](https://github.com/ForkAwesome/Fork-Awesome)') | ||
43 | console.log(' * playlist add by Google') | ||
40 | } | 44 | } |
41 | } | 45 | } |
42 | 46 | ||
diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index b0668436d..2d728fef5 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh | |||
@@ -2,12 +2,13 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | # Zanata does not support inner elements in <source>, so we hack these special elements | ||
6 | # This regex translate the converted elements to initial Angular elements | ||
7 | |||
8 | for i in 1 2 3; do | 5 | for i in 1 2 3; do |
6 | # Angular does not like when there is not target element, so we create it with the same content than the source element | ||
7 | perl -0pi -e 's#<source>([^<]+)</source>\s*<context-group #<source>\1</source><target>\1</target><context-group #g' client/src/locale/target/angular_*.xml | ||
8 | |||
9 | # Zanata does not support inner elements in <source>, so we hack these special elements | ||
10 | # This regex translate the converted elements to initial Angular elements | ||
9 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml | 11 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml |
10 | perl -0pi -e 's|<source>(.+?)</source>\s*<context-group |<source>\1</source><target>\1</target><context-group |g' client/src/locale/target/angular_*.xml | ||
11 | done | 12 | done |
12 | 13 | ||
13 | npm run i18n:xliff2json | 14 | npm run i18n:xliff2json |
diff --git a/scripts/travis.sh b/scripts/travis.sh index 3557816c8..c38bd2cab 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh | |||
@@ -20,16 +20,16 @@ elif [ "$1" = "cli" ]; then | |||
20 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts | 20 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts |
21 | elif [ "$1" = "api-1" ]; then | 21 | elif [ "$1" = "api-1" ]; then |
22 | npm run build:server | 22 | npm run build:server |
23 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-1.ts | 23 | sh ./server/tests/api/travis-1.sh 2 |
24 | elif [ "$1" = "api-2" ]; then | 24 | elif [ "$1" = "api-2" ]; then |
25 | npm run build:server | 25 | npm run build:server |
26 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-2.ts | 26 | sh ./server/tests/api/travis-2.sh 2 |
27 | elif [ "$1" = "api-3" ]; then | 27 | elif [ "$1" = "api-3" ]; then |
28 | npm run build:server | 28 | npm run build:server |
29 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-3.ts | 29 | sh ./server/tests/api/travis-3.sh 2 |
30 | elif [ "$1" = "api-4" ]; then | 30 | elif [ "$1" = "api-4" ]; then |
31 | npm run build:server | 31 | npm run build:server |
32 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-4.ts | 32 | sh ./server/tests/api/travis-4.sh 2 |
33 | elif [ "$1" = "lint" ]; then | 33 | elif [ "$1" = "lint" ]; then |
34 | npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts" | 34 | npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts" |
35 | 35 | ||