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

Implement a proper language system #567

Merged
merged 39 commits into from
May 7, 2022
Merged

Implement a proper language system #567

merged 39 commits into from
May 7, 2022

Conversation

KingRainbow44
Copy link
Member

@KingRainbow44 KingRainbow44 commented May 6, 2022

this PR was HELL to create.

Adds a new localization system using .json files instead of hardcoding a lot of values in .java files.
This allows for us to use a tool like Crowdin! (https://translate.grasscutters.xyz)

Changelog:

  • Formatting changes
  • Switch to using translation keys (ex. grasscutter.best.server) instead of file constants
  • Load language translation keys from a JSON file in src/main/resources/languages

@KingRainbow44 KingRainbow44 requested review from 4Benj, a user, alt3ri and memetrollsXD May 6, 2022 05:00
@KingRainbow44
Copy link
Member Author

can I just say thanks to @Melledy for helping create the en_US.json file
i did maybe 30 entries, but he did the rest

@KingRainbow44 KingRainbow44 marked this pull request as ready for review May 6, 2022 05:07
@4Benj
Copy link
Member

4Benj commented May 6, 2022

This allows for us to use a tool like Crowdin! (https://translate.grasscutters.xyz/)

😲 There's something on the website! lol
Anyway, I'll review this when I get home

@maineeeee
Copy link

how do i login back to my genshin priv server i played yesterday but it says cant connect when i try to login back

@Scirese
Copy link
Contributor

Scirese commented May 6, 2022

Will existing translations be preserved?

Akka0 and others added 3 commits May 6, 2022 00:12
- Respects player setting.
- SP + MP.
- Statue has unlimited HP volume (to be updated)
@mcxiaoke
Copy link

mcxiaoke commented May 6, 2022

other existing language files should be translated to the new format

@ghost
Copy link

ghost commented May 6, 2022

Yes, someone will have to migrate the CN ones over before this gets pushed.

@Scirese
Copy link
Contributor

Scirese commented May 6, 2022

Yes, someone will have to migrate the CN ones over before this gets pushed.

Thanks,That will greatly reduce our work. :)

Max is currently set to 85000 for everyone. Will update after implementing statue levels.
Akka0 and others added 22 commits May 7, 2022 00:11
Co-Authored-By: ShigemoriHakura <62388797+ShigemoriHakura@users.noreply.github.com>
Co-Authored-By: KanyeWestc <104547412+KanyeWestc@users.noreply.github.com>
Co-Authored-By: QAQ 天小络 <72185326+XTL676@users.noreply.github.com>
Co-Authored-By: nkxingxh <25559053+nkxingxh@users.noreply.github.com>
Co-Authored-By: Yazawazi <47273265+Yazawazi@users.noreply.github.com>
Co-Authored-By: wuwuwu223 <81224214+wuwuwu223@users.noreply.github.com>
Co-Authored-By: omg-xtao <100690902+omg-xtao@users.noreply.github.com>
Co-Authored-By: Sakura <104815797+Sakura@users.noreply.github.com>
Co-Authored-By: NewNeko-2022 <104819344+NewNeko-2022@users.noreply.github.com>
Co-Authored-By: JimWails <30657653+JimWails@users.noreply.github.com>
Co-Authored-By: buttercookies <19878609+ButterCookies@users.noreply.github.com>
Tower Dungeons Handoff between levels
* 修复一个Gson发序列化json文件的空值问题

* Improved fault tolerance for json file deserialization
…el and world level (#586)

* Add files via upload

* Add files via upload

* Update GameConstants.java

* Update Config.java

* Update PacketGetPlayerFriendListRsp.java
@KingRainbow44
Copy link
Member Author

to the person who initially added the language system, please don't use constants for languages

@KingRainbow44 KingRainbow44 merged commit 4455072 into development May 7, 2022
@ghost ghost deleted the localization branch May 7, 2022 02:19
Birdulon pushed a commit to Birdulon/Grasscutter that referenced this pull request Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet