Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About translation #26

Open
way-zer opened this issue Apr 12, 2023 · 7 comments
Open

About translation #26

way-zer opened this issue Apr 12, 2023 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@way-zer
Copy link
Owner

way-zer commented Apr 12, 2023

About translation

All texts in scripts are hard-coded and dynamicly replaced, so it can only collect after use. I have provided api when a untranslated message used, and using machine translate to auto translate.

I think manual polishing is a must. However, in this way, I think it's hard to share with other.

possible resolution

  • A online service to publish translation, can be use by others. (may be hard to implement and maintain. and different servers may have different scripts.)
  • A script to extract all text from scripts. (may be difficult to ensure completeness, easier to maintain)
  • or ...
@way-zer way-zer added the help wanted Extra attention is needed label Apr 12, 2023
@way-zer way-zer pinned this issue Apr 12, 2023
@NR-The-Void
Copy link

I didn't quite understand your translation system. I saw that it creates a lang.in file and that when I modify the text in another language, nothing changes.

我不太明白你们的翻译系统,我看到它创建了一个 lang.in 文件,但当我用另一种语言修改文本时,却没有任何变化。

@NR-The-Void
Copy link

I can't use pontoon mozila or another service of this type because it transforms the .po files to recover all the and it finds practically nothing on your project.

@way-zer
Copy link
Owner Author

way-zer commented Dec 6, 2023

I didn't quite understand your translation system. I saw that it creates a lang.in file and that when I modify the text in another language, nothing changes.

我不太明白你们的翻译系统,我看到它创建了一个 lang.in 文件,但当我用另一种语言修改文本时,却没有任何变化。

the current lang file usage:

[[sentence]]
_raw="\n[green] (若未投票,{delay}秒后将弹窗提示)"
_lastUse=1701858089966
en="[green] (If there is no vote, a pop-up window will prompt after {delay} seconds)"

And recommand config

sa config coreLibrary.lang.fallbackMap set {
    "*" : "en",
    "en" : "zh",
    "zh" : "@raw",
    "zh_CN" : "zh",
    "zh_TW" : "zh_CN"
}

Also, you need sa lang load to reload the lang file.

For the implementation, you can look coreLibrary/lang.kts

@way-zer
Copy link
Owner Author

way-zer commented Dec 6, 2023

I can't use pontoon mozila or another service of this type because it transforms the .po files to recover all the and it finds practically nothing on your project.

There is no uniform standards for translation file. So I choose one easy to use scripts read and write.

@NR-The-Void
Copy link

[[sentence]]
_raw="\n[green] (若未投票,{delay}秒后将弹窗提示)"
_lastUse=1701858089966
en="[green] (If there is no vote, a pop-up window will prompt after {delay} seconds)"

i understand i need add a line en="[green] (If there is no vote, a pop-up window will prompt after {delay} seconds) to translate and not modify the raw line, i undertands now why before is not working, i go try when i have the time

thx

@DemuraAIdev
Copy link

there is no sa lang reload command?

@way-zer
Copy link
Owner Author

way-zer commented Apr 20, 2024

there is no sa lang reload command?

sa lang load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants