diff --git a/l10n.yaml b/l10n.yaml index 15338f2d..148a1fbd 100644 --- a/l10n.yaml +++ b/l10n.yaml @@ -1,3 +1,4 @@ arb-dir: lib/l10n template-arb-file: app_en.arb output-localization-file: app_localizations.dart +untranslated-messages-file: lib/l10n/untranslated-messages.txt diff --git a/lib/l10n/README.md b/lib/l10n/README.md new file mode 100644 index 00000000..f7c4e9f8 --- /dev/null +++ b/lib/l10n/README.md @@ -0,0 +1,22 @@ +# Localization + +Each file stores the localized strings for a single language. The file is named with the corresponding ISO language code (e.g., app_**en**.arb for English). For languages with variants, an optional script code and/or country code may be followed (e.g., app_zh_**Hans**.arb, app_zh_**Hant**.arb). Check out the [flutter documentation](https://flutter.dev/docs/development/accessibility-and-localization/internationalization#advanced-topics-for-further-customization) for more details. + +## Help with translations + +Each item in an ARB file is formatted like the following. +``` +"exampleString": "Hello World", +"@exampleString": { + "description": "An example string" +} +``` +In the above example, only the `"Hello World"` part needs to be translated. `exampleString` is the key used to access this string and must not be modified. The `@exampleString` block provides metadata for this string and is only intended to be read by the translators, it's not necessary to be translated either. + +### For a new language + +`app_en.arb` contains all strings that needed to be localized. + +### For an existing language + +`untranslated-messages.txt` contains a list of untranslated strings for each language. diff --git a/lib/l10n/untranslated-messages.txt b/lib/l10n/untranslated-messages.txt new file mode 100644 index 00000000..854fdbab --- /dev/null +++ b/lib/l10n/untranslated-messages.txt @@ -0,0 +1,33 @@ +{ + "el": [ + "albumTrashLabel", + "restoreTooltip", + "restoreSelectedProcessingNotification", + "restoreSelectedSuccessNotification", + "restoreSelectedFailureNotification", + "restoreProcessingNotification", + "restoreSuccessNotification", + "restoreFailureNotification", + "deletePermanentlyTooltip", + "deletePermanentlyConfirmationDialogTitle", + "deletePermanentlyConfirmationDialogContent" + ], + + "es": [ + "searchTooltip", + "albumSearchTextFieldHint", + "clearTooltip", + "listNoResultsText", + "albumTrashLabel", + "restoreTooltip", + "restoreSelectedProcessingNotification", + "restoreSelectedSuccessNotification", + "restoreSelectedFailureNotification", + "restoreProcessingNotification", + "restoreSuccessNotification", + "restoreFailureNotification", + "deletePermanentlyTooltip", + "deletePermanentlyConfirmationDialogTitle", + "deletePermanentlyConfirmationDialogContent" + ] +}