Skip to content

An open-source cross-platform alternative to AirDrop

docs: add slang analysis

Tien Do Namce5df242372f
diff --git a/README.md b/README.md
index e517f8bb..b6464075 100644
--- a/README.md
+++ b/README.md
@@ -47,15 +47,19 @@ flutter run
You can help translating this app to other languages!
-Checkout locale codes [here](https://saimana.com/list-of-country-locale-code/).
-1. Fork this repository
-2. Create or update the translation file in [assets/i18n](https://github.com/localsend/localsend/tree/main/assets/i18n) (format: `strings_XXX.i18n.json`)
-3. Optional: Re-run this app
+
+1. Preparation
+ 1. Add missing translations in existing languages: [assets/i18n/_missing_translations.json](https://github.com/localsend/localsend/blob/main/assets/i18n/_missing_translations.json)
+ 2. Fix existing translations in [assets/i18n](https://github.com/localsend/localsend/tree/main/assets/i18n)
+ 3. Add new languages: [locale codes](https://saimana.com/list-of-country-locale-code/).
+2. Fork this repository
+3. Create or update the translation file in [assets/i18n](https://github.com/localsend/localsend/tree/main/assets/i18n) (format: `strings_XXX.i18n.json`)
+4. Optional: Re-run this app
1. Make sure you have [run](#run) this app once.
2. Update translations via `flutter pub run slang`
3. Run app via `flutter run`
-4. Open a pull request
+5. Open a pull request
For convenience, you can use this link: https://github.com/localsend/localsend/new/main/assets/i18n
diff --git a/assets/i18n/_missing_translations.json b/assets/i18n/_missing_translations.json
new file mode 100644
index 00000000..ee1ba45c
--- /dev/null
+++ b/assets/i18n/_missing_translations.json
@@ -0,0 +1,13 @@
+{
+ "@@info": [
+ "Here are translations that exist in <en> but not in secondary locales.",
+ "After editing this file, you can run 'flutter pub run slang apply --locale=<locale>' to quickly apply the newly added translations."
+ ],
+ "de": {},
+ "zh-Hans": {
+ "tray": {
+ "open": "@:general.open",
+ "close": "Quit LocalSend"
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/i18n/_unused_translations.json b/assets/i18n/_unused_translations.json
new file mode 100644
index 00000000..05ca8311
--- /dev/null
+++ b/assets/i18n/_unused_translations.json
@@ -0,0 +1,15 @@
+{
+ "@@info": [
+ "Here are translations that exist in secondary locales but not in <en>.",
+ "[--full enabled] Furthermore, translations not used in 'lib/' according to the 't.<path>' pattern are written into <en>."
+ ],
+ "en": {
+ "locale": "English",
+ "general": {
+ "online": "Online",
+ "save": "Save"
+ }
+ },
+ "de": {},
+ "zh-Hans": {}
+}
\ No newline at end of file