Bug 422381 - Make Krita's Windows Installer Translatable
Summary: Make Krita's Windows Installer Translatable
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Translation (show other bugs)
Version: 4.3.0-beta2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alvin Wong
URL: https://phabricator.kde.org/T13266
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-02 17:41 UTC by Tyson Tan
Modified: 2020-06-11 11:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2020-06-02 17:41:08 UTC
Krita's Windows installer is English across all language. While the user can press "Next" all the way, it'd be more user friendly if we can provide a translatable installer, so non-English users can feel more at home. 

In fact, because Krita's Installer is English only, many user thought Krita doesn't support their language or they have downloaded the wrong version. They often ended up downloading Krita from content farms, where they provided outdated, fake localized versions which might have only the installer translated, but planted with malwares.
Comment 1 Alvin Wong 2020-06-02 17:56:03 UTC
I'll see what I can do about the installer.

We wouldn't want fake versions out there though, can anything be done about them?
Comment 2 Tyson Tan 2020-06-02 18:15:26 UTC
Thank you Alvin. Looking forward to it!

Unfortunately I don't think we can do anything about the installers on the content farms. Those people won't answer to our call. Being malicious is how they profit. As long as we provide adequate localization, they will eventually lose all relevance.

In fact, after I rewrote the Chinese translation for krita.org and Scott provided the much appreciated infrastructures for including additional information, the SEO is now so much better. Krita and its download page now shows up first wehn searching for "Krita" in most Chinese search engines, which was not the case a month ago. Our local community saw quicker user growth and less confusion around the basics, I think it's working. But some new users are still lacking confidence when they saw the installer being English.
Comment 3 Alvin Wong 2020-06-03 05:53:23 UTC
I can basically tack on the translations included with NSIS [1], which covers
plenty of the strings, but the installer do have some custom strings that will
need to be translated. It will take some time to figure out a proper
translation workflow.

Do we want a temporary, half-done solution to go with 4.3.0? If yes, there are
two options:

1. I can translate the strings for both Traditional Chinese (TC) and Simplified
   Chinese (SC), so we can consider shipping an installer with only English, TC
   and SC for 4.3.0. If anyone is quick enough to translate for other languages
   we may also include them.
2. We ship all available languages in NSIS, with all untranslated strings
   falling back to English.

[1]: https://svn.code.sf.net/p/nsis/code/NSIS/tags/v305/Contrib/Language%20files/
Comment 4 Tyson Tan 2020-06-03 07:55:10 UTC
Thanks Alvin, since it won't affect any untranslated languages, I think shipping 4.3.0 with TC/SC translations for the installer is a good idea. Please do let me know if my work is needed here.
Comment 5 Tyson Tan 2020-06-03 12:08:38 UTC
I've improved the SC translation files for NSIS:
https://www.dropbox.com/sh/lu92wl75kkejxe6/AABvNmSVtRAnmyXCQ8_Lau4wa?dl=0

Anything else that I can do, please let me know.
Comment 6 Alvin Wong 2020-06-03 12:42:20 UTC
(In reply to Tyson Tan from comment #5)
> I've improved the SC translation files for NSIS:
> https://www.dropbox.com/sh/lu92wl75kkejxe6/AABvNmSVtRAnmyXCQ8_Lau4wa?dl=0
> 
> Anything else that I can do, please let me know.

Perhaps you can try upstreaming your changes to https://sourceforge.net/p/nsis/patches/?
Comment 7 Tyson Tan 2020-06-03 13:03:31 UTC
Honestly I'm not looking forward to participate in yet another project so soon. There is so much to do with Krita's translation alone. The current installer's translation dates back to 2010 and has mistakes and feels awkward, but it's serviceable. I will consider about going upstream later. 

If my updated files are a hassle to use in production, just leave them be. :P
Comment 8 Alvin Wong 2020-06-03 15:53:16 UTC
It's fine if you don't want to upstream the changes for now, it's just for letting more users benefit from your improvements. I will see if it's worth applying them locally.

In the meantime, I have extracted and prepared the strings for a one-off translation which you can find them on Invent [1]. Please note that the strings might still be changed, and the TC strings are just what I think would be suitable and not a professional translation. If you feel like doing the SC strings then please go ahead.

[1]: https://invent.kde.org/graphics/krita/-/merge_requests/359/diffs#diff-content-d86e3c7cd0d79eafc2513481fc9e2dc742c48521
Comment 9 Tyson Tan 2020-06-04 07:51:49 UTC
I tried to create or upload the translated file, but it kept displaying: 

An error occurred while committing your changes.
[Please try again]

The try again button doesn't do anything. I'm very confused.
Comment 10 Alvin Wong 2020-06-04 08:01:38 UTC
(In reply to Tyson Tan from comment #9)
> I tried to create or upload the translated file, but it kept displaying: 
> 
> An error occurred while committing your changes.
> [Please try again]
> 
> The try again button doesn't do anything. I'm very confused.

Just attach the file here and I'll put it in for you.
Comment 11 Tyson Tan 2020-06-04 08:11:22 UTC
OK, I forked the NSIS Localization branch, commit the new changes and created a merge request. Anything more I must do to make it work?
Comment 12 Alvin Wong 2020-06-04 09:04:08 UTC
(In reply to Tyson Tan from comment #11)
> OK, I forked the NSIS Localization branch, commit the new changes and
> created a merge request. Anything more I must do to make it work?

Thanks, it's now included in my merge request.
Comment 13 Alvin Wong 2020-06-04 09:21:37 UTC Comment hidden (obsolete)
Comment 14 Alvin Wong 2020-06-04 14:37:01 UTC
@Tyson Tan

The latest nightly build [1] now includes the installer translations. Please check it out and let me know what you think. (FWIW the overflowing caption text happens due to the long version string. It should not be an issue with normal releases.)

If you consider it OK, it will probably go into the 4.3 branch in preparation for release.

After that I'll start working on making it translatable through the normal KDE translation workflow.

[1]: https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/
Comment 15 Tyson Tan 2020-06-04 16:58:02 UTC
Hi Alvin, it worked flawlessly! Thank you so much for making this a reality. With the localized installer, it actually felt like a totally different experience. The installer automatically matching to the correct language will be very assuring to the users.

NSIS's SC translation though. That's a whole new level of jankiness. I will try to fix that in upstream later.

Through the process I've learned the basics of the WebIDE, thanks to Wolthera's documentation. Hopefully I can be more useful in the future. :P
Comment 16 Tyson Tan 2020-06-04 17:28:26 UTC
I've filed a ticket in NSIS project and attached both translated files:
https://sourceforge.net/p/nsis/patches/297/
Comment 17 Alvin Wong 2020-06-05 08:59:21 UTC Comment hidden (obsolete)
Comment 18 Halla Rempt 2020-06-05 09:18:47 UTC Comment hidden (obsolete)
Comment 19 Tyson Tan 2020-06-08 02:33:36 UTC
The updated simplified Chinese patch I submitted has been accepted by NSIS.
Comment 20 Alvin Wong 2020-06-09 13:14:47 UTC
@Boud

I propose that we incorporate Tyson's updates to the NSIS built-in strings by directly patching the binary NSIS zip release. This way I don't need to make awful hacks in the build steps to get them in.

To make the patched package you would need to:

1. get `nsis-3.05.zip` and extract it somewhere, then
2. in `nsis-3.05/Contrib/Language files` replace `SimpChinese.nlf` and `SimpChinese.nsh` with the ones downloaded from [1] and [2], then
3. rename the top dir `nsis-3.05` to something like `nsis-3.05-patched`, then
4. zip it back up as `nsis-3.05-patched.zip` (note the file name should match the top dir name), then
5. upload it to files.kde.org/krita/build/dependencies/

Does this seem good to you?

[1]: https://sourceforge.net/p/nsis/code/7187/tree//NSIS/trunk/Contrib/Language%20files/SimpChinese.nlf?format=raw
[2]: https://sourceforge.net/p/nsis/code/7187/tree//NSIS/trunk/Contrib/Language%20files/SimpChinese.nsh?format=raw
Comment 21 Halla Rempt 2020-06-09 13:56:48 UTC
Okay, sure. And I guess when we can update to the version of nsis that has the translations we should move to that?
Comment 22 Alvin Wong 2020-06-10 06:58:04 UTC
(In reply to Boudewijn Rempt from comment #21)
> Okay, sure. And I guess when we can update to the version of nsis that has
> the translations we should move to that?

Yes, exactly.
Comment 23 Halla Rempt 2020-06-10 09:05:56 UTC
Done.
Comment 24 Alvin Wong 2020-06-11 08:25:00 UTC Comment hidden (obsolete)
Comment 25 Alvin Wong 2020-06-11 08:29:54 UTC Comment hidden (obsolete)
Comment 26 Alvin Wong 2020-06-11 10:33:16 UTC
I guess we should continue over at https://phabricator.kde.org/T13266
Comment 27 Alvin Wong 2020-06-11 11:09:01 UTC
Git commit ae013c966de62c9002633304e371f03f8bf5ed08 by Alvin Wong.
Committed on 11/06/2020 at 08:32.
Pushed by rempt into branch 'krita/4.3.0'.

Win installer: Bump to use new patched NSIS 3.05

Squashed commit of the following:

commit 223f89013dea2846e2bc216498d4307a0602a7dc
Author: Alvin Wong <alvin@alvinhc.com>
Date:   Thu Jun 11 16:23:05 2020 +0800

    Win installer: Update hash for patched NSIS package

    The patched package contains new Simp. Chinese translations by Tyson
    Tan.
    (cherry picked from commit 08bdfe561e8020a906da1abdcef30638eaa668da)

commit 404f5f27d61561cc9894fe1d536182d3d3d907b6
Author: Alvin Wong <alvin@alvinhc.com>
Date:   Wed Jun 3 17:16:39 2020 +0800

    Bump Windows installer NSIS version to 3.05

    This is mainly for the updated translations which might be used in the
    future.

    (cherry picked from commit aec3418f259bc7b810d548f590647b86c1cdcbaa)

M  +2    -2    packaging/windows/installer/MakeInstallerNsis.cmake.in

https://invent.kde.org/graphics/krita/commit/ae013c966de62c9002633304e371f03f8bf5ed08