Merge branch 'main' into cloudHome

This commit is contained in:
ぞぞかす 2023-10-04 06:57:05 +09:00 committed by GitHub
commit c5b5ef71a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 77 deletions

146
README.md
View file

@ -1,7 +1,7 @@
# APP Locale
This repository contains the locale assets for the core UI of [Resonite](https://resonite.com) and allow anyone to contribute translations. The contents of this repository will be periodically merged with the public build released on Steam (STEAM) and other platforms.
# Resonite Locale
This repository contains the locale assets for the core UI of [Resonite](https://resonite.com) and allows anyone to contribute translations. The contents of this repository will be periodically merged with the public build released on Steam (STEAM) and other platforms.
# Localization Status
## Localization Status
Czech [cs] - 72.3% - Missing keys: 461
German [de] - 83.6% - Missing keys: 272
English (United Kingdom) [en-gb] - 1.7% - Missing keys: 1634
@ -23,12 +23,71 @@ Turkish [tr] - 53.3% - Missing keys: 777
Chinese (China) [zh-cn] - 62.8% - Missing keys: 619
Chinese (Taiwan) [zh-tw] - 60.7% - Missing keys: 654
Total keys: 1663
Total keys: 1635
# How To Contribute
If you'd like to contribute translations, create a branch of fork of the repository, make the changes and once they are ready to be merged create a Pull Request, so the contributions can be checked and merged. You don't need to translate everything at once, if you cover part of the UI, the changes can be merged, with more translations coming later.
## How To Contribute
If you'd like to contribute translations, create a fork of the repository, make the changes and **once they are ready** to be merged create a Pull Request, so the contributions can be checked and merged. You don't need to translate everything at once, if you cover part of the UI, the changes can be merged, with more translations coming later.
# Do's and don'ts
### Translating the Store descriptions
If you're like, you can help translate the store descriptions as well (this is used on Steam for example), but we consider those highly optional since it's quite a lot of text. If you don't want to translate those, don't worry about them! The store descriptions do not count towards the translation completeness percentage and are provided in separate files.
If you do translate them and you haven't added a credit yet, put your name in the regular .json file for translations of in-game strings, even if you haven't translated any in-game strings.
### If you're contributing a new language
1. [Create a new Issue](https://github.com/Yellow-Dog-Man/Locale) for given language in format "Language [lang-code]", for example "English [en]", which will help coordinate efforts of different translators.
1. Verify that our' ork of ICU MessageFormat.NET has pluralizer for your language, by checking the "AddStandardPluralizers()" function in this file: https://github.com/YellowDogMan/messageformat.net/blob/master/src/Jeffijoe.MessageFormat/Formatting/Formatters/PluralFormatter.cs
If you can't find your language code in this file, please make a Issue either on in this repository.
Alternatively you can implement the pluralizer yourself based on the reference from the Unicode CLDR repository: https://github.com/unicode-org/cldr/blob/master/common/supplemental/plurals.xml and make a pull request for it to be merged with our fork or MessageFormat.NET
3) Add a new [lang-code].json file to your fork. We highly recommend creating a skeleton file first without any translation strings, just containing the Locale and Authors and creating a pull request, so it's clearer to other contributors that translations are being worked on by someone.
### Contributing translations to a language
If you'd like to contribute translations for existing language file (or one you have just created), we recommend the following:
1) Make a fork of the repository or your own branch.
2) Update the language file, either by modifying the translation strings or adding new ones for missing translations.
3) Ensure you do not have any left-over English strings in the file. Your file should only contain actually translated strings. Any missing strings will automatically fallback (see below for details)
4) Ensure your modified translation file works correctly inside Resonite (see below how to test)
5) Create a Pull Request for your translations to be merged into the main repository. After merging they will be available publicly in the next public build of Resonite.
As we develop our platform, we'll be constantly adding new strings in English or modifying the existing ones. We recommend watching the repository for activity through GitHub, so you can get notified when there are changes and new strings to be translated.
### Collaborating & Conflicts
Sometimes when translating, multiple users can translate the same area/section at the same time. This results in a Conflict, as the Resonite Team usually cannot speak the language. We're unable to decide which PR should be merged. When a conflict occurs any PRs involved will be marked with a Conflicts label. Please work with other translators of the language to resolve any conflicts so that the team can proceed to merge PRs clearly.
### Testing your translation
As you work on the translation we recommend that you periodically check it inside of Resonite. This will not only help ensure that you don't have any syntax errors, but also make sure that the strings are correct in the context.
To test the translation, find folder where Resonite.exe is installed (on Steam, you can do so by right clicking Resonite, going to Properties -> LOCAL FILES -> BROWSE LOCAL FILES...) and then locate the "Locale" folder. Simply place your modified file into this folder and Resonite will load it up.
By default, Resonite uses your system locale to determine which file to load. You can override this by going to Settings and changing the "Override Locale" to a different language code.
- You can edit the translation file on the fly without shutting down Resonite. To force it to reload, change the locale to "en" and then back to your own.
- Note that while most UI will change language immediately, not all of it would. Simply close and reopen the UI dialog to load the translated strings
- If the string is showing in English, you probably have a typo in the string key. It needs to match exactly
- If the translation isn't loading in Resonite, it is likely JSON syntax error preventing it from being loaded
- If you see "ERROR!!!" instead of your translated string, you have a syntax error in the particular string. Check Resonite's log file, which will contain details.
### If you use an external tool to do the translation and the JSON structure is mangled
You can use the python script in this repository: CleanJSON.py
For example to clean the french json, `./CleanJSON.py --en en.json --lang fr.json --out fr.json.cleaned`
```usage: CleanJSON.py [-h] [--en en_path] [--lang lang_path] [--out out_path]
This script will reformat a Babel style JSON for locales to match the en.json
baseline formatting for git changes purposes.
optional arguments:
-h, --help show this help message and exit
--en en_path The path to the en.json locale file.
--lang lang_path The path to the LANG.json locale file to clean.
--out out_path The path to save the formatted file.
```
## Do's and Don'ts
- Make sure the .json locale file is UTF8 encoded
- Always keep the "Dummy" : "Dummy" entry at the bottom of the file. This way you don't have to remember to remove the comma at the end of the last entry every time
- Copy & Paste the whole content of the file into this online validator to ensure you don't have any syntax errors: https://jsonformatter.curiousconcept.com/
@ -42,47 +101,8 @@ If you'd like to contribute translations, create a branch of fork of the reposit
- DON'T correct mistakes in the string keys, only report them. They will be fixed by a script, which will apply the correction to all locales at once.
- DON'T submit purely machine translated locales. Those often result in odd and confusing results for user interfaces. Using machine translation as basis for manual translation is ok.
# Translating the Store descriptions
If you're like, you can help translate the store descriptions as well (this is used on Steam for example), but we consider those highly optional since it's quite a lot of text. If you don't want to translate those, don't worry about them! The store descriptions do not count towards the translation completeness percentage and are provided in separate files.
If you do translate them and you haven't added a credit yet, put your name in the regular .json file for translations of in-game strings, even if you haven't translated any in-game strings.
# If you're contributing a new language
1. [Create a new Issue](https://github.com/Yellow-Dog-Man/Locale) for given language in format "Language [lang-code]", for example "English [en]", which will help coordinate efforts of different translators.
1. Verify that our' ork of ICU MessageFormat.NET has pluralizer for your language, by checking the "AddStandardPluralizers()" function in this file: https://github.com/YellowDogMan/messageformat.net/blob/master/src/Jeffijoe.MessageFormat/Formatting/Formatters/PluralFormatter.cs
If you can't find your language code in this file, please make a Issue either on in this repository.
Alternatively you can implement the pluralizer yourself based on the reference from the Unicode CLDR repository: https://github.com/unicode-org/cldr/blob/master/common/supplemental/plurals.xml and make a pull request for it to be merged with our fork or MessageFormat.NET
3) Add a new [lang-code].json file to your fork. We highly recommend creating a skeleton file first without any translation strings, just containing the Locale and Authors and creating a pull request, so it's clearer to other contributors that translations are being worked on by someone.
# Contributing translations to a language
If you'd like to contribute translations for existing language file (or one you have just created), we recommend the following:
1) Make a fork of the repository or your own branch.
2) Update the language file, either by modifying the translation strings or adding new ones for missing translations.
3) Ensure you do not have any left-over English strings in the file. Your file should only contain actually translated strings. Any missing strings will automatically fallback (see below for details)
4) Ensure your modified translation file works correctly inside APP (see below how to test)
5) Create a Pull Request for your translations to be merged into the main repository. After merging they will be available publicly in the next public build of APP.
As we develop our platform, we'll be constantly adding new strings in English or modifying the existing ones. We recommend watching the repository for activity through GitHub, so you can get notified when there are changes and new strings to be translated.
# Testing your translation
As you work on the translation we recommend that you periodically check it inside of APP. This will not only help ensure that you don't have any syntax errors, but also make sure that the strings are correct in the context.
To test the translation, find folder where APP.exe is installed (on Steam, you can do so by right clicking APP, going to Properties -> LOCAL FILES -> BROWSE LOCAL FILES...) and then locate the "Locale" folder. Simply place your modified file into this folder and APP will load it up.
By default, APP uses your system locale to determine which file to load. You can override this by going to Settings and changing the "Override Locale" to a different language code.
- You can edit the translation file on the fly without shutting down APP. To force it to reload, change the locale to "en" and then back to your own.
- Note that while most UI will change language immediately, not all of it would. Simply close and reopen the UI dialog to load the translated strings
- If the string is showing in English, you probably have a typo in the string key. It needs to match exactly
- If the translation isn't loading in APP, it is likely JSON syntax error preventing it from being loaded
- If you see "ERROR!!!" instead of your translated string, you have a syntax error in the particular string. Check APP's log file, which will contain details.
# The ICU MessageFormat Syntax for translation strings
APP uses the ICU MessageFormat Syntax defined by the Unicode organization for its localized strings. This offers high amount of flexibility on how you translate strings and ensures that you can correctly follow the grammar rules of your language, particularly with regards to pluralization (e.g. displaying "1 item" vs "1 items"). This is why it's important to ensure that your language has a pluralizer implemented in our fork of MessageFormat.NET
## The ICU MessageFormat Syntax for translation strings
Resonite uses the ICU MessageFormat Syntax defined by the Unicode organization for its localized strings. This offers high amount of flexibility on how you translate strings and ensures that you can correctly follow the grammar rules of your language, particularly with regards to pluralization (e.g. displaying "1 item" vs "1 items"). This is why it's important to ensure that your language has a pluralizer implemented in our fork of MessageFormat.NET
To learn more about the ICU MessageFormat Syntax check the following links:
https://unicode-org.github.io/icu/userguide/format_parse/messages/
@ -101,7 +121,7 @@ Another common syntax is using the {variable, select, ...} form. This lets you m
Please let us know if you have any questions or are unsure about certain things.
# Language codes and fallbacks
## Language codes and fallbacks
We uses the IETF language tags (https://en.wikipedia.org/wiki/IETF_language_tag) to load locales. These consist of a single primary language tag (typically two-letter language code from ISO 639-1 or a three-letter code from ISO 639-2 (1998), ISO 639-3 (2007) or ISO 639-5 (2008)) and and optional region sub-tag with country code.
When loading locale file, we will first check for the most specific locale file. Then it will load any missing strings from the general locale file and last it will load any missing strings from the English locale.
@ -112,31 +132,15 @@ We recommend putting most translations into the general language file (single tw
Any strings you don't translate at all will also fall back into their English variants, so you don't have to worry about missing some of them, they can be translated later (or by another contributor). This also ensures that newly added strings in the English will show up and can be gradually translated as they come.
# What if I find string that cannot be translated?
While majority of APP's UI has been converted to the localization system, there are likely a few stragglers and some parts that aren't translatable right now. If you encounter such place, create an Issue on this repository, ideally with screenshot of the non-translatable part, so we can convert it as well.
## FAQ
### What if I find string that cannot be translated?
While majority of Resonite's UI has been converted to the localization system, there are likely a few stragglers and some parts that aren't translatable right now. If you encounter such place, create an Issue on this repository, ideally with screenshot of the non-translatable part, so we can convert it as well.
Currently there are a few known parts that cannot be translated, but are planned to:
Currently there are a few known parts that cannot be translated, but are planned to be supported at a later date:
- Enumerations (e.g. certain tool options that cycle through several options)
- Component names and categories (component names will still show original for technical reasons, but will show optional translation for non-English languages)
- ProtoFlux node names and categories (same as above)
- Component fields (those will only show optional translated names on hover once tooltip system is implemented)
# If you use an external tool to do the translation and the JSON structure is mangled
You can use the python script in this repository: CleanJSON.py
For example to clean the french json, `./CleanJSON.py --en en.json --lang fr.json --out fr.json.cleaned`
```usage: CleanJSON.py [-h] [--en en_path] [--lang lang_path] [--out out_path]
This script will reformat a Babel style JSON for locales to match the en.json
baseline formatting for git changes purposes.
optional arguments:
-h, --help show this help message and exit
--en en_path The path to the en.json locale file.
--lang lang_path The path to the LANG.json locale file to clean.
--out out_path The path to save the formatted file.
```
# Any questions?
If you have questions or are unsure about something, you can create an Issue on this repository or reach out to our team on the official Discord: https://discord.gg/resonite
### Any other questions?
If you have questions or are unsure about something, you can create an Issue on this repository to ask a question

13
ja.json
View file

@ -1,6 +1,6 @@
{
"localeCode": "ja",
"authors": ["orange", "Melnus", "Aesc", "kazu", "zozokasu"],
"authors": ["orange", "Melnus", "Aesc", "kazu", "Rabbuttz", "zozokasu"],
"messages": {
"General.OK": "OK",
"General.Start": "開始",
@ -379,8 +379,8 @@
"Indicator.ServerStatus": "クラウドステータス",
"Indicator.ServerStatus.Good": "良好",
"Indicator.ServerStatus.Slow": "重い",
"Indicator.ServerStatus.Down": "落ちてる!",
"Indicator.ServerStatus.NoInternet": "インターネットし",
"Indicator.ServerStatus.Down": "サーバーダウン",
"Indicator.ServerStatus.NoInternet": "インターネットし",
"Indicator.Sync.AllSynced": "シンク完了",
"Indicator.Sync.SyncingItems": "{item_count,plural, other {# 個のアイテムを}}シンク中<nobr>({item_percent} %)",
@ -1683,12 +1683,14 @@
"CloudHome.Info.StorageUsed": "ストレージ使用量:",
"CloudHome.Info.DashInfoTab.Title": "ようこそ!",
"CloudHome.Info.DashInfoDesktop": "Resoniteかんたんチュートリアル<br>その1 Escキーを押すと<i><color=hero.purple>ダッシュメニュー</color></i>が開きます。 フレンドやワールド一覧など、大事な機能はここに集約されています。<br><br>その2 このディスプレイには\"もしも\"の時に役立つ情報が書かれています。<br>一度目を通しておくことをお勧めします! 「閉じる」ボタンをクリックするとこのメニューを閉じられます。",
"CloudHome.Info.DashInfoVR": "Resoniteかんたんチュートリアル<br>その1 BまたはYボタンを押すと<i><color=hero.purple>ダッシュメニュー</color></i>が開きます。 フレンドやワールド一覧など、大事な機能はここに集約されています。。<br><br>その2 このディスプレイには\"もしも\"の時に役立つ情報が書かれています。<br>一度目を通しておくことをお勧めします! 「閉じる」ボタンをクリックするとこのメニューを閉じられます。",
"CloudHome.Info.DashInfoVRNoButtons": "Resoniteかんたんチュートリアル<br>その1 円が一周するまでメニューボタンを押し続けると<i><color=hero.purple>ダッシュメニュー</color></i> が開きます。 フレンドやワールド一覧など、大事な機能はここに集約されています。<br><br>その2 このディスプレイには\"もしも\"の時に役立つ情報が書かれています。<br>一度目を通しておくことをお勧めします! 「閉じる」ボタンをクリックするとこのメニューを閉じられます。",
"CloudHome.Info.GoToWiki": "Wikiを見る",
"CloudHome.Info.GoToDiscord": "Wikiを見る!",
"CloudHome.Info.GoToDiscord": "Discordを見る!",
"CloudHome.Info.ModerationTab.Title": "モデレーション",
"CloudHome.Info.ModerationTab.Content": "我々が重視するもの、それはユーザー皆様の安全です。 サポートを必要とする場合、または通報の際は <u><color=hero.cyan>モデレーションポータル</color></u><sprite name=hyperlink>にアクセスして<br>モデレーションチケットを発行してください。<br><br>有志で活動するモデレーターチーム<sprite name=modbadge>が<br>皆様やコミュニティの安全を守り抜きます! お問い合わせの他、ガイドラインに違反した行為を目撃した際は、<br>モデレーションチケットの発行にてお知らせください。",
@ -1728,7 +1730,8 @@
"StickyNote.SpinMe": "クルクルしてみ?",
"StickyNote.FruitPlate": "<size=1500>増える増える 不思議な果物</size>",
"StickyNote.EmptyForYou": "好きな物<br>飾ってね ❤",
"StickyNote.EmptyForYou": "好きな物<br>飾ってね :)",
"StickyNote.RelevantLinks": "関連リンク!<br><--<br><br><size=500>「接続書」などと言う人がいるらしい</size>",
"StickyNote.SunTool": "太陽を 動かしたいよう",
"StickyNote.Bow": "弓を引いて 的を射抜け!",

27
ru.json
View file

@ -1,6 +1,6 @@
{
"localeCode": "ru",
"authors": ["GhostZ36", "BrotiwkA", "Shadow Panther"],
"authors": ["GhostZ36", "BrotiwkA", "Shadow Panther", "ENTERTHEWOLF"],
"messages": {
"General.OK": "OK",
@ -1405,6 +1405,31 @@
"Temporary.MMC.VotedAlready": "Вы уже голосовали за {voteTarget}.",
"Temporary.MMC.VoteInvalid": "Голос некорректен, попробуйте снова.",
"Tools.Names.MultiTool": "Мульти инструмент"
"Tools.Names.CommonTools": "Обычный инструмент"
"Tools.Names.ManipulationTools": "Инструмент манипуляции"
"Tools.Names.InformationTools": "Инструмент информации"
"Tools.Names.GeometryLineBrush": "Кисть геометрических линий"
"Tools.Names.Developer": "Инструмент разработчика"
"Tools.Names.ComponentClone": "Копирование компонента"
"Tools.Names.ProtoFlux": "Инструмент ProtoFlux"
"Tools.Names.Material": "Инструмент материала"
"Tools.Names.Glue": "Клей"
"Tools.Names.Light": "Свет"
"Tools.Names.Shape": "Формы"
"Tools.Names.Microphone": "Микрофон"
"Tools.Names.GrabbableSetter": "Иструмент установки хватания"
"Tools.Names.PhysicalColliderSetter": "Установка физ.коллайдера"
"Tools.Names.MeshVisibility": "Инструмент видимости объекта"
"Tools.Names.CameraObjectVisibility": "Инструмент видимости объекта камеры"
"Tools.Names.Color": "Цвет"
"Tools.Names.Mesh": "Объект"
"Tools.Names.RiggedMeshTransfer": "Инструмент Переноса сетки"
"Tools.Names.Slicer": "Нож"
"Tools.Names.ControllerDiagnostic": "Диагностика контроллеров"
"Tools.Names.Measure": "Линейка"
"Tools.Names.Label": "Метка"
"Dummy": "Dummy"
}
}