From 9efaac57fa7130f04575c5e94e48fb15bbe03a5c Mon Sep 17 00:00:00 2001 From: Raatty Date: Tue, 2 Nov 2021 21:38:47 +1300 Subject: [PATCH 1/2] translation guide --- TRANSLATORS_GUIDE.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 TRANSLATORS_GUIDE.md diff --git a/TRANSLATORS_GUIDE.md b/TRANSLATORS_GUIDE.md new file mode 100644 index 00000000..f711dca7 --- /dev/null +++ b/TRANSLATORS_GUIDE.md @@ -0,0 +1,35 @@ +# Translators Guide + +There are 3 main types of strings to be translated. + +## Simple +``` +Add new friend +``` +They are just plain text and are to be translated in full. + +## Placeholder +``` +{username} changed their avatar +``` +Contains one or more words surrounded by curly brackets "`{}`" anything outside of the curly brackets is to be translated as normal but the words in the curly brackets are **NOT** to be translated. In the above example "`{username}`" will be replaced by the users actual username by fluffychat. + +## Plural + +- {count,plural, =1{**1 more event**} other{{count} **more events**}} + +This is the most complicated string type, the parts in bold are the only parts that need translating in this string. You can identify plural strings by seeing the pattern `{word,plural,` at the start. `=1` and `other` are "selectors" so you can have multiple different translations for different quantities `other` is the only required selector and will be chosen if the count does not match any other selectors. + +Selector | Matches +---|--- +=0 | a count of exactly 0 +=1 | a count of exactly 1 +=2 | a count of exactly 2 +other | any number unless it matches a more specific rule + +There is also "few" and "many" but they seem to have language specific meaning. + +Also the selectors do not need to match the english version such as your language may not even use different words for when there is more than one of something so: + - {count,plural, other{{count} \}} + +could be a perfectly resonable way to translate. From c25f9356ff846f21c6ec30c8cc9e411ccddf3f65 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Mon, 8 Nov 2021 13:52:07 +0100 Subject: [PATCH 2/2] chore: update flutter matrix html --- pubspec.lock | 6 +++--- pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index eed91fd7..5e886482 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -196,7 +196,7 @@ packages: name: csslib url: "https://pub.dartlang.org" source: hosted - version: "0.17.0" + version: "0.17.1" cupertino_icons: dependency: "direct main" description: @@ -444,14 +444,14 @@ packages: name: flutter_math_fork url: "https://pub.dartlang.org" source: hosted - version: "0.3.3+1" + version: "0.4.2+2" flutter_matrix_html: dependency: "direct main" description: name: flutter_matrix_html url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.1.0" flutter_native_splash: dependency: "direct dev" description: diff --git a/pubspec.yaml b/pubspec.yaml index 772c195e..7527488f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -31,7 +31,7 @@ dependencies: flutter_localizations: sdk: flutter flutter_map: ^0.14.0 - flutter_matrix_html: ^1.0.4 + flutter_matrix_html: ^1.1.0 flutter_olm: ^1.1.2 flutter_openssl_crypto: ^0.0.1 flutter_secure_storage: ^4.2.1