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

Translation system update project #1084

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Translation system update project #1084

wants to merge 10 commits into from

Conversation

Zbizu
Copy link
Contributor

@Zbizu Zbizu commented Jan 25, 2025

Description

This PR modernizes the way the translations are handled

the goals of this PR are the following:

  • sort translations by their location
  • support placing the arguments anywhere in text by using %1, %2, ..., %n instead of default string.format syntax (this will make the translations more flexible against grammar differences between languages)
  • reduce the amount of ambiguity in some UI areas (example for Polish translation: "center" as center the minimap button will be "centruj" or "wyśrodkuj", while "center" as center of some block it will be "środek", and center of impact area will be "centrum", using tr('center') for all three would result in poor quality translations)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Not ready for testing yet.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@Zbizu
Copy link
Contributor Author

Zbizu commented Jan 25, 2025

This pull request is at very early stage. Tell me what you think about it.

@ericcobblepot
Copy link

  • sort translations by their location
  • support placing the arguments anywhere in text by using %1, %2, ..., %n instead of default string.format syntax (this will make the translations more flexible against grammar differences between languages)
  • reduce the amount of ambiguity in some UI areas (example for Polish translation: "center" as center the minimap button will be "centruj" or "wyśrodkuj", while "center" as center of some block it will be "środek", and center of impact area will be "centrum", using tr('center') for all three would result in poor quality translations)

in your language it won't have much problem with special characters?

you mentioned the word “wyśrodkuj”
look
image

  Label
    text: "wyśrodkuj"

@Zbizu
Copy link
Contributor Author

Zbizu commented Jan 26, 2025

@ericcobblepot
that's encoding issue
the game client uses cp1252 (or latin1) encoding, which is limited to 256 characters only
Current Polish translation doesn't use accents either, but that's not much of a problem because they don't hold much importance in the written language. It's very rare for a Polish word to change its meaning when you take its accents away.

Changing this would require either adjusting fonts or introducing wstring which is a topic for separate pr

@Zbizu
Copy link
Contributor Author

Zbizu commented Jan 28, 2025

roughly 900 strings are left

@Zbizu
Copy link
Contributor Author

Zbizu commented Jan 30, 2025

Project will be paused for now. I caught a cold and need to take a break from coding.

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.

2 participants