qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

NSIS: Add Filipino translation

Open IverCoder opened this issue 2 years ago • 16 comments

Added a Filipino translation

IverCoder avatar May 07 '23 09:05 IverCoder

Hello?

IverCoder avatar May 11 '23 16:05 IverCoder

Is it enough to just add such a file? Shouldn't it also be referred from some config file?

glassez avatar May 11 '23 17:05 glassez

It needs additional lines for filipino language in the file "translations.nsi". Location: dist\windows\translations.nsi I've prepared one already, so probably that can be included to this PR: http://www.should.keepfree.de/qbt/translations.nsi

Not to loose the work of @IverCoder I've made a pull request for that :)

schnurlos avatar May 19 '23 09:05 schnurlos

There is a shortcoming of NSIS. The language ids (eg ${LANG_ARABIC}) are kinda predefined. They are pulled in from the files/translations available in C:\Program Files (x86)\NSIS\Contrib\Language files. There's probably a way to define more IDs (or use the raw numerical value), however there isn't documentation on that. And personally I can't be bothered to spend time figuring this out.

So in short, this PR can't be merged as-is because it won't be picked up by the scripts.

sledgehammer999 avatar May 29 '23 16:05 sledgehammer999

So at least first filipino needs to be added to NSIS ( https://forums.winamp.com/forum/developer-center/nsis-discussion/nsis-translations/133401-how-to-help-translating?s=&threadid=157119 ) and later it can be implemented to qbittorrent ...

schnurlos avatar Jul 06 '23 06:07 schnurlos

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

github-actions[bot] avatar Sep 05 '23 00:09 github-actions[bot]

NSIS could get the filipino (tagalog) language with the next releases :)

schnurlos avatar Sep 08 '23 17:09 schnurlos

Have a look here: https://forums.winamp.com/forum/developer-center/nsis-discussion/nsis-translations/4620731-filipino-tagalog-translation-of-nsis Perhaps a native speaker should investigate?

schnurlos avatar Oct 02 '23 07:10 schnurlos

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

github-actions[bot] avatar Dec 02 '23 00:12 github-actions[bot]

whats the harm in merging this ?

luzpaz avatar Dec 02 '23 01:12 luzpaz

https://forums.winamp.com/forum/developer-center/nsis-discussion/nsis-translations/4620731-filipino-tagalog-translation-of-nsis As long as no native speaker is verifying or updating my google translation in NSIS it will not be implemented there. After that the PR in qbittorrent is able to be accepted - that's the reason.

schnurlos avatar Dec 06 '23 09:12 schnurlos

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

github-actions[bot] avatar Feb 05 '24 00:02 github-actions[bot]

Bump https://github.com/qbittorrent/qBittorrent/pull/18935#issuecomment-1842521566

schnurlos avatar Feb 06 '24 06:02 schnurlos

@schnurlos do you have any experience with NSIS? Read my comment https://github.com/qbittorrent/qBittorrent/pull/18935#issuecomment-1567309779

Let me summarize how qbittorrent loads NSIS languages:

  1. In dist/windows/translations.nsh it enables all the included MUI translations (aka builtin NSIS translations) and all of qbt's translations for qbt's strings
  2. It presents a MUI dialog to the user to select a language: https://github.com/qbittorrent/qBittorrent/blob/f265eb0166f57a5dd866a5461b7bf2ab3076ee9f/dist/windows/installer.nsh#L117
  3. NSIS does string translation in this way:
    1. A string variable named custom_var is used in code like this $(custom_var). The $() wraps and denotes a translatable string var
    2. For every translatable string var you provide a translation using the LangString function. example:
    LangString inst_startmenu ${LANG_FRENCH} "Créer un Raccourci dans le Menu Démarrer"
    
    (each file in dist/windows/installer-translations/ is loaded from translation.nsh and each one uses LangString for their respective locale) The 2nd argument of LangString is a language_id. Now, refer to step 1 above. Each !insertmacro MUI_LANGUAGE <lang> sets the language id for that language. And that id is somehow used to populate the language selection dialog in step 2. However, the NSIS docs don't mention how to define/register your own language id and populate the dialog for your own language that isn't included as builtin in NSIS.

If you have knowledge on how to achieve this, please share it. Otherwise, there's no point in merging this PR. The language won't be shown as a choice to the end user.

sledgehammer999 avatar Mar 03 '24 01:03 sledgehammer999

Take notice of PR #20501

sledgehammer999 avatar Mar 04 '24 00:03 sledgehammer999

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

github-actions[bot] avatar May 03 '24 00:05 github-actions[bot]

This PR was closed because it has been stalled for some time with no activity.

github-actions[bot] avatar May 10 '24 00:05 github-actions[bot]