-
Notifications
You must be signed in to change notification settings - Fork 772
HULD improvements #1292
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
HULD improvements #1292
Conversation
1077d41 to
348e1be
Compare
|
THANKS GOD - |
348e1be to
b1d4db8
Compare
|
will it allow us to translate npc display names as well? 😍 |
|
Not yet @EPuncker, you cannot change display name yet.. |
|
Good point about the NPC display names. We can do something about it, but there will be limitations:
|
|
already going to buy poedit pro in order to full translate my server 😍 I'm so excited lol |
4106855 to
dab32fe
Compare
9266ed4 to
02f0cb3
Compare
02f0cb3 to
fc4c918
Compare
- Clears a VECTOR, without freeing its data (truncates length, preserving capacity) Signed-off-by: Haru <[email protected]>
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <[email protected]>
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <[email protected]>
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
- The generated translation file now loads cleanly without encoding conversion errors Signed-off-by: Haru <[email protected]>
- The function now checks its arguments, rather than passing them to
the system implementation (safer against arbitrary memory access or
wrong variable type)
- Implemented positional ('%1$d') specifiers (POSIX style)
- See script_commands.txt for details about the supported format
specifiers.
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
…ity) - parse_simpleexpr_paren() - parse_simpleexpr_number() - parse_simplexpr_string() - parse_simpleexpr_name() Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
- The `\r` character, in a `mes` dialog, is normally represented by the
client as a hard line-break.
- Since a client may have different requirements in line lengths (for
example using a font with different size or metrics), an user might
wish to ignore hard-wraps and let the client automatically soft-wrap
instead.
- If you want to hard-wrap (official default), keep the
SCRIPT_MES_STRIP_LINEBREAK define commented out.
- If you want to let the client soft-wrap automatically (may work better
for custom clients), uncomment it.
- Imprved HULD handling of `\r` (to avoid control characters in the
generated file)
- Please note that this requires cooperation by script writers:
* Each `mes` should contain one and only one sentence, possibly
without using the '+' concatenation (but, rather, sprintf).
* Two separate sentences (where a hard-wrap is required even for
soft-wrapped text) should always go into separate `mes` commands.
* Following the above two recommendations, also produces a better
quality translations .pot file.
Signed-off-by: Haru <[email protected]>
…s format string - Strings passed to sprintf should use the _$() macro instead of _(), to generate the .pot translation template with a directive to correctly handle the % sign. - Strings passed through _() are instead explicitly marked as regular (non format) strings if they contain '%'. Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
- `mes` strings are split by sentences: each string contains one and only one sentence. Line-break hints are specified with \r (and for readability the string is split in multiple lines with parse-time concatenation, without using the '+' operator) - When sentences need concatenation (variable names or values), sprintf is used, so that the generated translatable string is still one and only one. The `_()` macro is used inside sprintf, to mark the string as translatable. - `select()` / `prompt()` entries are in separate entries, separated by commas, where possible (it makes their translation easier) - This makes it easier to translate NPCs to languages with different sentence ordering (and with longer or shorter sentences). In the generated .pot, sentecnes will no longer span across several strings. Only the npc/jobs/2-2/alchemist.txt script was modified, as a proof of concept. Signed-off-by: Haru <[email protected]>
- Replaced hardcoded item names with getitemname() Only the npc/jobs/2-2/alchemist.txt script was modified, as a proof of concept. Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
Signed-off-by: Haru <[email protected]>
The script->get_translation_file_name() is more robust (and actually works) now. Signed-off-by: Haru <[email protected]>
fc4c918 to
a8590a0
Compare
|
I added generate-translations and map-server restarts after fully loaded. |
|
@botka4aet just move generated-translations.so out from plugins folder but I guess you figured it out by now. Just leaving a comment for reference. |
Hercules Ultimate Localization Design
Some highlights:
Added option to strip hard line-breaks from
mesdialogs\rcharacter, in amesdialog, is normally represented by the client as a hard line-break.instead.
\r(to avoid control characters in the generated file)messhould contain one and only one sentence, possibly without using the '+' concatenation (but, rather, sprintf).mescommands.Proof-of-concept best scripting practices for HULD
messtrings are split by sentences: each string contains one and only one sentence. Line-break hints are specified with \r (and for readability the string is split in multiple lines with parse-time concatenation, without using the '+' operator)_()or_$()macros are used, to mark the string as translatable. For format strings, use_$()and for normal strings use_(). When using mesf, no additional action is necessary.select()/prompt()entries are in separate entries, separated by commas, where possible (it makes their translation easier)