From 192b453ac7e7d1c6a31ae48612a1cc09fc4f5601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Dobro=C5=88?= Date: Sun, 10 Jul 2022 22:11:34 +0200 Subject: [PATCH] Fix typos --- docs/translating.md | 4 +++- src/fbt/Services/TranslationsGeneratorService.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/translating.md b/docs/translating.md index 82a6486..7eebd89 100644 --- a/docs/translating.md +++ b/docs/translating.md @@ -14,7 +14,7 @@ php ./vendor/bin/fbt generate-translations --src=./path/to/.source_strings.json ### Options: | name | default | description | |-------------------------|--------------------------|-------------------------------------------------------------------------------------------------------| -| --src | ./.source_strings.json | Path to colleccted source strings file | +| --src | ./.source_strings.json | Path to collected source strings file | | --translation-input | ./translation_input.json | Path to translation input file | | --translations=`[path]` | *none* | The translation files containing translations.
E.g. `--translations=./path/to/translations/*.json` | @@ -33,6 +33,8 @@ php ./vendor/bin/fbt translate --path=/path/to/storage --translations=/path/to/t | --translations=`[path]` | *none* | The translation files containing translations.
E.g. `--translations=/path/to/translations/*.json` | | --stdin < translation_input.json | *none* | Instead of reading translation files and source file separately, read monolithic JSON file from STDIN | +## JSON schema: + In addition to the below example, the `translation_input.json` provided in our [tests](https://github.com/richardDobron/fbt/blob/main/tests/translations/stdin-data/translation_input.json) is a good reference on the "schema" used for the translations. diff --git a/src/fbt/Services/TranslationsGeneratorService.php b/src/fbt/Services/TranslationsGeneratorService.php index 442bf08..09ab030 100644 --- a/src/fbt/Services/TranslationsGeneratorService.php +++ b/src/fbt/Services/TranslationsGeneratorService.php @@ -178,10 +178,10 @@ public function generateTranslations(string $source, $translationsPath, $inputPa [ 'translation' => '', 'variations' => [], - 'tokens' => [], - 'types' => [], ], ], + 'tokens' => [], + 'types' => [], ]; } }