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

Unified locales #391

Merged
merged 25 commits into from
Dec 20, 2024
Merged

Unified locales #391

merged 25 commits into from
Dec 20, 2024

Conversation

LotP1
Copy link
Contributor

@LotP1 LotP1 commented Dec 16, 2024

Use 1 locales file instead of individual files for each langauge.
This makes it easier to keep track of what is missing.
The PR will automatically fix missing locales and throw an error if anything is incorrect, by running the emulator. That way the person adding a new locale or new language can just run the emulator once to populate all the fields, so they can easily begin translating.

@github-actions github-actions bot added the gui Affects the Avalonia UI or translations. label Dec 16, 2024
This was referenced Dec 17, 2024
@LotP1 LotP1 changed the title locales rework Unified locales Dec 17, 2024
Validation project is no longer inlcuded in the solution by default.
Ryujinx.csproj can/will call the validation project in a Rebuild.
Should fix all issues.
Left in a debug message that i will remove if all goes well.
Removing the line used for debugging
@GreemDev GreemDev merged commit 9cddf3b into Ryubing:master Dec 20, 2024
10 checks passed
@LotP1 LotP1 mentioned this pull request Dec 22, 2024
@LotP1 LotP1 deleted the unified-locales branch December 28, 2024 00:24
@Fs00
Copy link

Fs00 commented Dec 29, 2024

As a translator, I don't see how this can be considered an improvement over the previous way of storing translations.

The previous JSON format used a well-established convention which is understood by several tools for editing and managing translations. The custom format introduced in this PR leaves translators with no choice but to edit the JSON file directly, which is inefficient and error-prone (need to manually deal with newlines, escaping quotes, etc.).

The advantage of making it easier to keep track of missing strings can already be achieved by directing people to use a translation editor (such as Poedit or even a simple web-based one like this). These tools typically present all strings in a tabular format which makes it very easy to see "blank spots" where the translation is missing.

Furthermore, having strings belonging to different languages close to each other makes merge conflicts more likely to happen and IMO doesn't help with cognitive overhead when working on such a large file.

I do hope this gets reconsidered.

@LotP1
Copy link
Contributor Author

LotP1 commented Dec 29, 2024

This was originally done since we're using community translators and I wanted to ease the work of getting the correct translations by giving translators more context from other languages.
We also had problems with devs adding new locales only to en_US, or to only a set of the languages, which caused issues. And it's also easier to reset locales if that is necessary when ui elements get updated.
#444 should address the issue of tracking errors in the file. It will throw better errors when the file uses incorrect line endings, is missing fields or has duplicate fields. It will also fix missing or duplicate fields and incorrect line endings if you use a local build.

@Fs00
Copy link

Fs00 commented Dec 30, 2024

I see your point, but these problems stem from the fact that translators edit the JSON file(s) directly, which is not what they should be supposed to do.

Why not set up Crowdin (or another translation platform)? That way, translators won't have to deal with JSONs because they will be automatically updated by the translation platform.
Even if you don't want to set up a platform, guiding people to use a translation editor will prevent many common issues and the validation step in the CI can catch the rest.

The biggest problem I have with this PR is that the custom JSON format prevents translators from using the proper tools to do their job, be it a local editor like Poedit or a translation platform.

@rrondo
Copy link
Contributor

rrondo commented Jan 3, 2025

It’s truly much more easy and user-friendly to translate now, as you can instantly access examples from other languages. Thanks!

marco-carvalho pushed a commit to marco-carvalho/Ryujinx-1 that referenced this pull request Jan 5, 2025
Use 1 locales file instead of individual files for each langauge.
This makes it easier to keep track of what is missing.
The PR will automatically fix missing locales and throw an error if
anything is incorrect, by running the emulator. That way the person
adding a new locale or new language can just run the emulator once to
populate all the fields, so they can easily begin translating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui Affects the Avalonia UI or translations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants