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

Add new nsh2po and po2nsh converters #1858

Open
unho opened this issue Jan 27, 2011 · 4 comments
Open

Add new nsh2po and po2nsh converters #1858

unho opened this issue Jan 27, 2011 · 4 comments

Comments

@unho
Copy link
Member

unho commented Jan 27, 2011

Version: trunk

NSH files are used by NSIS, a script-driven Windows installation system which is used by Mozilla, OpenOffice, Inkscape... Windows installers. More info about NSIS in http://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System

I can't locate a formal spec of this format, only some comments in http://nsis.sourceforge.net/Include/LangFile.nsh saying that:

Language strings in the language file have the format:
${LangFileString} LANGSTRING_NAME "Text"

But you can use this sample files:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/packaging/win32/languages/English.nsh
http://www.geogebra.org/trac/browser/trunk/geogebra/installer/nsis/Contrib/Language%20files?rev=6053&order=name

If you search the Internet you can find several dozens of examples.

@yarons
Copy link
Contributor

yarons commented Jun 21, 2018

I know this one is rather old but is there any plan for a direct support?

@nijel
Copy link
Member

nijel commented Jun 21, 2018

@yarons
Copy link
Contributor

yarons commented Jul 1, 2018

I got an official reply from the NSIS lead developer:
http://forums.winamp.com/showthread.php?p=3157439#post3157439

Also pasting it here:

There is no spec for the .nsh translation files. It's syntax is the same as other NSIS .nsh files. In short that is:

  • Line comments start with ; or #
  • Block comments (like C) with /* and */
  • Quotes around strings: One of ", ' or ` (Pick what you want but they have to be paired)
  • Preprocessor instructions start with !

NSIS v2 files are usually encoded in the codepage used by that language. NSIS v3 uses UTF-8 BOM. NSIS v3 also supports inserting Unicode codepoints (${U+1234} etc). NSIS v2 is not accepting new translations, only bugfixes.

Each string is used in a single place and plural form should follow the English translation. We expect most people to just take the latest English file and translate it: https://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/trunk/Contrib/Language%20files/English.nsh

The comments/credits at the start is optional but we generally prefer the Windows language id and the authors name there. You can add a e-mail and/or website address there as well if you wish. If there is no author credits in the .nlf nor the .nsh then we will be unable to add your credits to the documentation.

The next line is a bit tricky and has changed over the years, "!insertmacro LANGFILE" wants

  1. The .nlf filename (you don't have to get this correct, we can change it later if required) but ideally this name should be plain ASCII. It is never displayed to the user.

  2. The English name of the language. Unicode characters are technically allowed but should not happen in practice because English is plain ASCII.

  3. The native official name of the language, in Unicode.

  4. The native name of the language, in ASCII. Might not be possible in all languages but try your best.

(see French.nsh, Greek.nsh and PortugueseBR.nsh for examples)

The rest of the strings are just translated from English.

@yarons
Copy link
Contributor

yarons commented Sep 18, 2018

Is this comment helpful enough? Do we need any further information for the implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants