Move translations to "translations" folder.

This commit is contained in:
Buster Neece 2022-10-07 16:29:57 -05:00
parent a5a21cf2d4
commit a265597dae
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
49 changed files with 761 additions and 914 deletions

View File

@ -74,7 +74,7 @@ jobs:
- name: Clear existing locales.
if: github.event_name == 'push' || github.event_name == 'schedule'
run: |
rm -rf resources/locale/*.UTF-8
rm -rf translations/*.UTF-8
- name: Generate new translations from existing code.
if: github.event_name == 'push' || github.event_name == 'schedule'
@ -152,7 +152,7 @@ jobs:
name: assets
if-no-files-found: error
path: |
resources/locale
translations
web/static/dist
web/static/webpack_dist
web/static/webpack.json

View File

@ -4,5 +4,5 @@ api_token_env: CROWDIN_PERSONAL_TOKEN
preserve_hierarchy: true
files:
- source: /resources/locale/default.pot
translation: /resources/locale/%locale_with_underscore%.UTF-8/LC_MESSAGES/default.po
- source: /translations/default.pot
translation: /translations/%locale_with_underscore%.UTF-8/LC_MESSAGES/default.po

View File

@ -2,10 +2,6 @@ services:
web:
build:
context: .
# Control wether Liquidsoap should be built from source via OPAM or download the
# pre-built .deb file from the Liquidsoap GitHub Releases on ARM based machines
# args:
# ARM_FULL_BUILD: true
ports:
- "127.0.0.1:3306:3306"
- "127.0.0.1:6379:6379"

View File

@ -6,7 +6,7 @@ services:
user: "${AZURACAST_PUID:-1000}:${AZURACAST_PGID:-1000}"
volumes:
- $PWD/frontend:/data/frontend
- $PWD/resources/locale:/data/resources/locale
- $PWD/translations:/data/translations
- $PWD/web/static:/data/web/static
- frontend_node_modules:/data/frontend/node_modules

View File

@ -5,7 +5,7 @@ RUN apk update \
RUN groupdel dialout
RUN mkdir -p /data/frontend/node_modules /data/resources/locale /data/web/static \
RUN mkdir -p /data/frontend/node_modules /data/translations /data/web/static \
&& chown -R node:node /data
RUN USER=node && \

View File

@ -2,10 +2,10 @@
"name": "azuracast",
"license": "Apache-2.0",
"scripts": {
"build": "gulp",
"watch": "gulp watch",
"generate-locales": "gettext-extract --attribute v-translate --keywords '$gettext' --output ../resources/locale/frontend.pot $(find ./vue -type f -name '*.vue')",
"import-locales": "gettext-compile --output ../resources/locale/translations.json $(find ../resources/locale/*.UTF-8/LC_MESSAGES -type f -name 'default.po')"
"build" : "gulp",
"watch" : "gulp watch",
"generate-locales" : "gettext-extract --attribute v-translate --keywords '$gettext' --output ../translations/frontend.pot $(find ./vue -type f -name '*.vue')",
"import-locales" : "gettext-compile --output ../translations/translations.json $(find ../translations/*.UTF-8/LC_MESSAGES -type f -name 'default.po')"
},
"dependencies": {
"@babel/core": "^7.15.5",

View File

@ -37,7 +37,7 @@ final class GenerateCommand extends CommandAbstract
$io = new SymfonyStyle($input, $output);
$io->title('Generate Locales');
$exportDir = $this->environment->getBaseDirectory() . '/resources/locale';
$exportDir = $this->environment->getBaseDirectory() . '/translations';
$translations = Translations::create('default');
$destFile = $exportDir . '/default.pot';

View File

@ -32,7 +32,7 @@ final class ImportCommand extends CommandAbstract
$io = new SymfonyStyle($input, $output);
$io->title('Import Locales');
$localesBase = $this->environment->getBaseDirectory() . '/resources/locale';
$localesBase = $this->environment->getBaseDirectory() . '/translations';
$supportedLocales = SupportedLocales::cases();
$defaultLocale = SupportedLocales::default();

View File

@ -68,7 +68,7 @@ enum SupportedLocales: string
$translator = Loader::getInstance();
$translator->setlocale($this->value);
$translator->textdomain('default');
$translator->bindtextdomain('default', $environment->getBaseDirectory() . '/resources/locale');
$translator->bindtextdomain('default', $environment->getBaseDirectory() . '/translations');
}
Loader::loadFunctions();

File diff suppressed because it is too large Load Diff