ae server !
|
|
Hi, I would like to know how to help in translating this script to the ae server Thanks |
|
|
Hi, You need to translate these texts ;
Texts['ae'] = {};
Texts['ae'].BattleFor = "Battle for %1";
Texts['ae'].SeaBattleNear = "Sea battle near %1";
Texts['ae'].Battles = "Battles";
Texts['ae'].BattlesXXXhrs = "Battles while last %1hrs";
Texts['ae'].WonLostBash = "won / lost / bash";
Texts['ae'].NoMoreCR = "no more recents combat reports";
Texts['ae'].NextXXXCR = "next %1 recents combat reports...";
Texts['ae'].BattlesWLB = "Battles: Won / Lost / Bash";
Texts['ae'].WLB = "W. / L. / Bash";
Define abbreviation for BattlesWLB, and only first letters for WLB because these texts may not be too long. Counters features require specific filters for your language ;
Filters['ae'] = {};
Filters['ae'].BattleFor = "^battle\\s+for\\s+(.+)$";
Filters['ae'].SeaBattleNear = "^sea\\s+battle\\s+near\\s+(.+)$";
Copy and paste some battles (and sea battles) titles here if you not understood how to create filters. NB: I may probably fix this script to support right-to-left languages ;o) |
|
|
Thanks man i have it good and working i can post the edited code if you want to |
|
|
Yes, give me your translation here to include it for next update ;o) |
|
|
Try:
for ( var id in Texts ) {
Filters[id] = {
BattleFor: new RegExp( "^" + Texts[id].BattleFor.replace( /\s+/g, "\\s+" ).replace( /%1/, "(.*)$" ), "i" ),
SeaBattleNear: new RegExp( "^" + Texts[id].SeaBattleNear.replace( /\s+/g, "\\s+" ).replace( /%1/, "(.*)$" ), "i" )
};
}
That should automate the creation of the filters (assuming I got the regular expressions correct). |
|
|
Thank you, nice idea :o) |