Skip to content

Add translation batch file for Windows #2303

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

Merged
merged 3 commits into from
Feb 26, 2023
Merged

Conversation

Kappa971
Copy link
Contributor

@Kappa971 Kappa971 commented Feb 26, 2023

We talked about it here: #2302

Includes uconv, taken from the ICU v72.1 package, and dos2unix v7.4.4 (32-bit versions).

@kcgen
Copy link
Member

kcgen commented Feb 26, 2023

The batch file looks good @Kappa971 👍

For the binaries in tools/ normally we don't add binaries to the repository (they are large, get outdated so add work to refresh them, and worse - may not match the user's runtime environment (64-bit vs 32-bit? x86 vs ARM? lots of variations here: https://github.com/unicode-org/icu/releases/tag/release-72-1).

If we have documentation for translators, these tools could be part of the per-requisites (similar to how those wanting to compile have to download Meson, clang, gcc, etc).

Another suggestion would be to add tools\readme.txt that points the user to the websites and asks them to unzip the packages inside the tools dir.

The batch file could even type it:

if NOT EXIST tools\uconv.exe type tools\readme.txt
if NOT EXIST tools\dos2unix.exe type tools\readme.txt

(or something like that)

We would also then want git to ignore any new files found inside tools/, which we can do using a little text file: contrib/resources/translations/.gitignore having a single line: tools.

@Kappa971
Copy link
Contributor Author

Kappa971 commented Feb 26, 2023

The batch file looks good @Kappa971 👍

For the binaries in tools/ normally we don't add binaries to the repository (they are large, get outdated so add work to refresh them, and worse - may not match the user's runtime environment (64-bit vs 32-bit? x86 vs ARM? lots of variations here: https://github.com/unicode-org/icu/releases/tag/release-72-1).

If we have documentation for translators, these tools could be part of the per-requisites (similar to how those wanting to compile have to download Meson, clang, gcc, etc).

Another suggestion would be to add tools\readme.txt that points the user to the websites and asks them to unzip the packages inside the tools dir.

The batch file could even type it:

if NOT EXIST tools\uconv.exe type tools\readme.txt
if NOT EXIST tools\dos2unix.exe type tools\readme.txt

(or something like that)

We would also then want git to ignore any new files found inside tools/, which we can do using a little text file: contrib/resources/translations/.gitignore having a single line: tools.

It would be better to be able to download the necessary tools (in Windows 10 and 11 there is curl).
I have no idea how to download the latest versions without having to modify the batch file for each new release...

@kcgen
Copy link
Member

kcgen commented Feb 26, 2023

It would be better to be able to download the necessary tools (in Windows 10 and 11 there is curl).
I have no idea how to download the latest versions without having to modify the batch file for each new release...

I know what you mean, @Kappa971 - it would be nice to offer this, but it gets even trickier: you have to figure out what architecture (ARM vs x86-32bit vs x86-64-bit) they're running too.. and yeah, then also keep these scripts updated to fetch the latest version.

Fortunately for anyone wanting to put in the help to translate (and that's not a small amount of work!) downloading a couple zip files and unpacking them is a tiny step - and it's just a one-time step.

@Kappa971
Copy link
Contributor Author

Kappa971 commented Feb 26, 2023

uconv.exe requires dlls that change name at each version (eg. icudt71.dll in version 71.1, icudt72.dll in version 72.1). I could list the required dlls as well, but I'm afraid they might be removed/renamed (eg. icudt72.dll becomes something82.dll) or new ones added in the future, and this would make the batch file and readme obsolete. Suggestions are welcome,

@kcgen
Copy link
Member

kcgen commented Feb 26, 2023

uconv.exe requires dlls that change name at each version (eg. icudt71.dll in version 71.1, icudt72.dll in version 72.1). I could list the required dlls as well, but I'm afraid they might be removed/renamed (eg. icudt72.dll becomes something82.dll) or new ones added in the future, and this would make the batch file and readme obsolete. Suggestions are welcome,

I like the current approach with the readme; interested translators can download the tools and unzip them without much trouble.

Copy link
Member

@kcgen kcgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @Kappa971.
I will squash the three commits into one, which would eliminate the binaries from the commit history.

@kcgen kcgen merged commit 6f25c80 into main Feb 26, 2023
@delete-merged-branch delete-merged-branch bot deleted the kappa/windows-batch-encode branch February 26, 2023 23:20
@Kappa971
Copy link
Contributor Author

Kappa971 commented Feb 27, 2023

I was forgetting... translators need to update the German, French and Spanish translations with the new color tags to avoid the dos2unix error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation Issues related to translations
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants