Ind 945 Posted February 23, 2015 (edited) Hercules Ultimate Localization DesignHello~! - 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 useScript 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 .@status$,_("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 themLinks~! CommitEditing Example Edited January 4, 2017 by Dastgir formatting 1 29 Sephus, evilpuncker, Roberto and 27 others reacted to this Quote Share this post Link to post Share on other sites
zackdreaver 90 Posted February 23, 2015 Cool! Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted February 23, 2015 Awesome Quote Share this post Link to post Share on other sites
Legend 43 Posted February 23, 2015 Finally. Thanks~ Quote Share this post Link to post Share on other sites
JulioCF 105 Posted February 23, 2015 nice nice! Quote Share this post Link to post Share on other sites
Roberto 5 Posted February 23, 2015 Ind, could we send pull requests with updated pots for each language? Quote Share this post Link to post Share on other sites
daim 5 Posted February 23, 2015 awsome! thanks Quote Share this post Link to post Share on other sites
Milamber 1 Posted February 23, 2015 Nice! A Enterprising new Feature! 1 Roberto reacted to this Quote Share this post Link to post Share on other sites
Kusoo 3 Posted February 23, 2015 Amazing! Thanks for this. Quote Share this post Link to post Share on other sites
Petey Pablo 0 Posted February 23, 2015 nice work Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted February 23, 2015 the file is so f*cking huge xD lets see who will dare to translate it Quote Share this post Link to post Share on other sites
Kenpachi 65 Posted February 23, 2015 Hi guys. ( Yes, I'm still alive. ) First of all: great idea, great work! Besides messages.conf, all the dialogue utilised by 'mes' and 'select' is included in the .pot automatically This confused me, and so I checked the commit... Is it supposed to not include announce, mapannounce, areaaanounce, menu, dispbottom and probably some other string related commands? //EDIT: I put my hand up if you need a volunteer for a german translation. ~ Kenpachi Quote Share this post Link to post Share on other sites
Mystery 594 Posted February 23, 2015 Ind, could we send pull requests with updated pots for each language? I'm pretty sure it's more than welcomed But of course, just like any other pull request, it'd be under review. 1 Roberto reacted to this Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted February 24, 2015 Awesome Quote Share this post Link to post Share on other sites
Judas 100 Posted February 24, 2015 amazing work!! Quote Share this post Link to post Share on other sites
Relzz 32 Posted February 24, 2015 YOU IND, HARU JUST REALIZED MY DREAM ;-; GUYS THIS IS GREAT! THANKS I really love it:D I hope it will improve later, great job guys, really:D I had an orgasm, really Quote Share this post Link to post Share on other sites
OverLord 4 Posted February 24, 2015 Great job! Very thx! I loved! Quote Share this post Link to post Share on other sites
Kichi 6 Posted February 24, 2015 Ind has raised from his hibernate and bring good news Quote Share this post Link to post Share on other sites
Kichi 6 Posted February 24, 2015 btw how to use it on windows? by typing--generate-translations on map server? Quote Share this post Link to post Share on other sites
zackdreaver 90 Posted February 24, 2015 btw how to use it on windows? by typing --generate-translations on map server? make a shortcut then in target field add --generate-translations Quote Share this post Link to post Share on other sites
Kichi 6 Posted February 24, 2015 btw how to use it on windows? by typing --generate-translations on map server? make a shortcut then in target field add --generate-translations are you able to give me the example Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted February 24, 2015 btw how to use it on windows? by typing --generate-translations on map server? make a shortcut then in target field add --generate-translationsare you able to give me the example Open cmd, go to your Hercules folder , typemap-server --generate-translations Or save the above line in .bat file and run it Quote Share this post Link to post Share on other sites
Kichi 6 Posted February 24, 2015 (edited) btw how to use it on windows? by typing --generate-translations on map server? make a shortcut then in target field add --generate-translationsare you able to give me the example Open cmd, go to your Hercules folder , typemap-server --generate-translations Or save the above line in .bat file and run it this is the result [Warning]: Unable to open 'map-server', caching capabilities have been disabled! and i didn't see the output -- EDIT -- even map-server.exe --generate-translations still unable to produce the output are you guys able to produce the output or no? Edited February 24, 2015 by Kichi Quote Share this post Link to post Share on other sites
Kichi 6 Posted February 24, 2015 sry my mistakeafter i read the source generatetranslations, "Creates './generated_translations.pot' file with all the output file is generated_translations.pot' Quote Share this post Link to post Share on other sites