Ind

Hercules Ultimate Localization Design

89 posts in this topic

Can't open any Translate....GPLed program Error.

 

I have Windows 10, any Problem with this?

 

"Please contact the application support team..."

Share this post


Link to post
Share on other sites

- Po can be save ASCI to UTF-8 ?

- Client can use langtype default to UTF-8 ?

- you have a simple file .po UTF-8 ?

 

Sry, I'm bad English.

simple, 

  1. generate the file .po of emu.
  2. open the file .po in notepad++ and convert to ANSI
  3. CONVERT TO UNIX FORMAT the file .po and save. 
  4. Open Podit and use iso-8859-1 character

Work very fine, tested in poedit and the game,

best rewards from ultimate localization system of rAthena :)

Edited by Darknessfmy

Share this post


Link to post
Share on other sites

 

- Po can be save ASCI to UTF-8 ?

- Client can use langtype default to UTF-8 ?

- you have a simple file .po UTF-8 ?

 

Sry, I'm bad English.

simple, 

  1. generate the file .po of emu.
  2. open the file .po in notepad++ and convert to ANSI
  3. CONVERT TO UNIX FORMAT the file .po and save. 
  4. Open Podit and use iso-8859-1 character

Work very fine, tested in poedit and the game,

best rewards from ultimate localization system of rAthena :)

 

rA?

Share this post


Link to post
Share on other sites

 

Hercules Ultimate Localization Design

Hello~! - What?!

  • [*]Servers are now able to run under any number of languages, without having any of the default files modified

    [*]Designed by Haruna and Ind

Translating NPCs without editing them

  • [*]By launching map server with the --generate-translations param a .pot (.po template) file will be created with all of the servers translate-able strings (including all npc dialogue), this file can be edited in text mode or by utilising any .po editor (there are many out there; for a high range of OSes)

    [*]A .po file does not need to be fully translated to be used, map server will know when loading the file, and will fallback to the hardcoded string in the npc files as necessary

    [*]Users are able to change their language with the new @lang command, @lang controls what language users see in @commands (msg_txt stuff) as well as over npc dialogues

    [*]map-server.conf has a new setting called default_language where server owners may specify which language should be used as a base

    [*]When you have a new .po file you want map server to use, add it to db/translations.conf

Easy to Maintain

  • [*]Since .po is a widely used format there are many tools that can help with merging for example Poedit, which easily consolidates a translated .po file with a newly generated .pot. For example when you have a translated .po and since it was created npc dialogs were added or modified all you have to do is launch map server to generate a new .pot, open your old .po in Poedit, go "Catalog -> Update from POT file" and it will insert the new translatable strings without touching your existing translations, it will also notify you of any "obsolete" strings that are in your .po file but that are no longer in use

Script Command Macro

  • [*]Besides messages.conf, all the dialogue utilised by 'mes' and 'select' is included in the .pot automatically, this patch also introduces a mechanism for utilising strings outside of these commands, the script macro _() which can be employed just as if it were a script function, for example set [email protected]$,_("Available"); tells map server to export "Available" as a translate-able string when it is run with --generate-translations (when running map server normally the macro has no overhead during runtime)

Special Thanks to

  • [*]Raizen and Roberto from Cronus, we would not have worked on this if it weren't for them

Links~!

Editing Example

attachicon.gifTranslationSample1.png

 

 

still working in the new revision on Hercules ? cuz i try to modify my map-server and add --generate-translations and nothing happened!

 

@ECHO OFF
CALL serv.bat map-server.exe map-server --generate-translations

 

 is that correct?

Share this post


Link to post
Share on other sites

I'm having problems with translations plugin. This is the npc:

 

prontera,50,50,0	script	NPC_TEST	PORING,{
	mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
	mes "Oh! you are " + strcharinfo(PC_NAME) + ", nice to meet you.";
	close;
}

In the example, all the text is included on generated translations file, but the line ", nice to meet you." is not.

 

It seems like if the strcharinfo command ends the line (even when the conditional boy/girl is all included and reanudates the line).

 

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid "A little "
msgstr ""

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid "boy"
msgstr ""

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid "girl"
msgstr ""

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid ". Who are you?"
msgstr ""

#: npc/test.txt
# mes "Oh! you are " + strcharinfo(PC_NAME) + ", nice to meet you.";
msgctxt "NPC_TEST"
msgid "Oh! you are "
msgstr ""

 

 

 

 

http://imgur.com/gallery/xwuXB

 

I get the error message,

unknow option '--generate-translations'

Windows

 

That is because since commits on Jun 25, 2016 it was moved translations template generator to a plugin and it is now needed to build the plugin to use it. You can build the plugin following this instructions (based on wiki) :

 

1. Open folder \vcproj-14\

2. Copy and paste plugin-sample.vcxproj to duplicate it.
3. Rename file "plugin-sample.vcxproj" to "generate-translations.vcxproj"
4. Open generate-translations.vcxproj in Notepad++
5. Find this line:
    <ProjectName>plugin-sample</ProjectName>
6. Rename 'plugin-sample' to 'generate-translations'
7. Find this line:
    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">generate-translations</TargetName>
8. Rename sample to generate-translations
9. Find this line:
    <ClCompile Include="..\src\plugins\sample.c" />
10. Renae sample to generate-translations
11. Save changes and close
12. Open MSVC. Do right-clic on Solution 'Hercules-14'. Select Add -> Existing Project...
13. Select generate-translations.vcxproj in folder \vcproj-14\
14. Right-click Hercules-14, Select Build-Solution
15. Add it to /conf/plugins.conf
plugins_list: [
    /* Enable HPMHooking when plugins in use rely on Hooking */
    "HPMHooking",     // <-- Uncomment this
    //"db2sql",
    //"sample",
    //"other",
    "generate-translations", // loads generate-translations plugin
]
Edited by Ragno

Share this post


Link to post
Share on other sites

 

I'm having problems with translations plugin. This is the npc:

 

prontera,50,50,0	script	NPC_TEST	PORING,{
	mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
	mes "Oh! you are " + strcharinfo(PC_NAME) + ", nice to meet you.";
	close;
}

In the example, all the text is included on generated translations file, but the line ", nice to meet you." is not.

 

It seems like if the strcharinfo command ends the line (even when the conditional boy/girl is all included and reanudates the line).

 

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid "A little "
msgstr ""

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid "boy"
msgstr ""

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid "girl"
msgstr ""

#: npc/test.txt
# mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
msgctxt "NPC_TEST"
msgid ". Who are you?"
msgstr ""

#: npc/test.txt
# mes "Oh! you are " + strcharinfo(PC_NAME) + ", nice to meet you.";
msgctxt "NPC_TEST"
msgid "Oh! you are "
msgstr ""

 

 

 

 

http://imgur.com/gallery/xwuXB

 

I get the error message,

unknow option '--generate-translations'

 

Windows

 

That is because since commits on Jun 25, 2016 it was moved translations template generator to a plugin and it is now needed to build the plugin to use it. You can build the plugin following this instructions (based on wiki) :

 

1. Open folder \vcproj-14\

2. Copy and paste plugin-sample.vcxproj to duplicate it.
3. Rename file "plugin-sample.vcxproj" to "generate-translations.vcxproj"
4. Open generate-translations.vcxproj in Notepad++
5. Find this line:
    <ProjectName>plugin-sample</ProjectName>
6. Rename 'plugin-sample' to 'generate-translations'
7. Find this line:
    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">generate-translations</TargetName>
8. Rename sample to generate-translations
9. Find this line:
    <ClCompile Include="..\src\plugins\sample.c" />
10. Renae sample to generate-translations
11. Save changes and close
12. Open MSVC. Do right-clic on Solution 'Hercules-14'. Select Add -> Existing Project...
13. Select generate-translations.vcxproj in folder \vcproj-14\
14. Right-click Hercules-14, Select Build-Solution
15. Add it to /conf/plugins.conf
plugins_list: [
    /* Enable HPMHooking when plugins in use rely on Hooking */
    "HPMHooking",     // <-- Uncomment this
    //"db2sql",
    //"sample",
    //"other",
    "generate-translations", // loads generate-translations plugin
]

Thank you! i get sucked this error in week.

http://imgur.com/4O73d0m

 

Poedit not allowed new scripting format? "\r"

Share this post


Link to post
Share on other sites

 

I'm having problems with translations plugin. This is the npc:

 

prontera,50,50,0	script	NPC_TEST	PORING,{
	mes "A little " + (Sex == SEX_MALE ? "boy" : "girl") + ". Who are you?";
	mes "Oh! you are " + strcharinfo(PC_NAME) + ", nice to meet you.";
	close;
}

 

mesf("A little %s. Who are you?", Sex == SEX_MALE ? "boy" : "girl");
mesf("Oh! you are %s, nice to meet you.", strcharinfo(PC_NAME));

to include functions, variables, strings or whatever you need to use mesf (mes+sprintf)

you can find some examples in my recent commits

reference sprintf

Share this post


Link to post
Share on other sites

 

 

That is because since commits on Jun 25, 2016 it was moved translations template generator to a plugin and it is now needed to build the plugin to use it. You can build the plugin following this instructions (based on wiki) :

 

 

1. Open folder \vcproj-14\

2. Copy and paste plugin-sample.vcxproj to duplicate it.
3. Rename file "plugin-sample.vcxproj" to "generate-translations.vcxproj"
4. Open generate-translations.vcxproj in Notepad++
5. Find this line:
    <ProjectName>plugin-sample</ProjectName>
6. Rename 'plugin-sample' to 'generate-translations'
7. Find this line:
    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">generate-translations</TargetName>
8. Rename sample to generate-translations
9. Find this line:
    <ClCompile Include="..\src\plugins\sample.c" />
10. Renae sample to generate-translations
11. Save changes and close
12. Open MSVC. Do right-clic on Solution 'Hercules-14'. Select Add -> Existing Project...
13. Select generate-translations.vcxproj in folder \vcproj-14\
14. Right-click Hercules-14, Select Build-Solution
15. Add it to /conf/plugins.conf
plugins_list: [
    /* Enable HPMHooking when plugins in use rely on Hooking */
    "HPMHooking",     // <-- Uncomment this
    //"db2sql",
    //"sample",
    //"other",
    "generate-translations", // loads generate-translations plugin
]

Thank you! i get sucked this error in week.

http://imgur.com/4O73d0m

 

Poedit not allowed new scripting format? "\r"

how it work now ? I tried to do what you said, but it didn't work! can you help me ?

i need to know how generate-translations work now, how can i generate a new translate with this new plugin ? and how can i configure this plugin?

Edited by ZelosAvalon

Share this post


Link to post
Share on other sites
mesf("A little %s. Who are you?", Sex == SEX_MALE ? "boy" : "girl");

This line better replace to:

 

if (Sex == SEX_MALE)
  mes("A little boy. Who are you?");
else
  mes("A little girl. Who are you?");
 

Because in some languages can be issue because sentence can be different depend on gender.

 

Share this post


Link to post
Share on other sites

Huld doesn't support \r in mes command (tested on Hercules-68947c86d5fe3eb2686c9b3393e3db0df083bb11 version).

 

Example:

 

Script:

mes("It seems those limbs belong to that ugly octopus. That monster should be taken care of,\r"
	"but it's hard for ourselves only to make it happen, hehe.");

 

Generated translation:

 

#: npc/re/instances/octopus_cave.txt
# mes("It seems those limbs belong to that ugly octopus. That monster should be taken care of,\r"
msgctxt "Starfish"
msgid "It seems those limbs belong to that ugly octopus. That monster should be taken care of,\rbut it's hard for ourselves only to make it happen, hehe."
msgstr "Parece que esas extremidades pertenecen a ese horrible pulpo. Alguien debería encargarse de ese monstruo,\rpero el hacerlo es muy difícil para nosotros solos, hehe."

Even when there is a translation, huld always shows English text.

Edited by Ragno

Share this post


Link to post
Share on other sites

Posted (edited)

generate-translations is not working, please fix it,  it's work now , ty

 

Edited by java

Share this post


Link to post
Share on other sites

How do I add "announce", "map announce" so that --generate_translations draws from NPCs?

I did not understand it!

Quote

 

Script Command Macro

  • Besides messages.conf, all the dialogue utilised by 'mes' and 'select' is included in the .pot automatically, this patch also introduces a mechanism for utilising strings outside of these commands, the script macro _() which can be employed just as if it were a script function, for example set [email protected]$,_("Available"); tells map server to export "Available" as a translate-able string when it is run with --generate-translations (when running map server normally the macro has no overhead during runtime)


 


 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now