Page 1 of 1

Format of Transl. Strings

Posted: 30 Jul 2004 22:40
by AbdullahYA
Hi All

First of all, sorry my bad english!!!

It will be nice to be allowed to change the ordem of parameters in strings

like:
STR_4801 :{WHITE}{CITY} {STRING}

that (if i'm not wrong) make the name of industries.... where
{CITY} can be "Pubourne"
and {STRING} can be "Sawmill"
we have "Pubourne Sawmill", a nice industry name, but in english!!!
in other languages like Portuguese (and Spanish) the better way is:
"Serralheria Pubourne"

If you try STR_4801 :{WHITE}{STRING} {CITY}
we get an error from strgen (a warning, and strgen ignores the wrong string), and would crash openttd if strgen let it pass... (be cause of the way DecodeString() fetches params)

So, my suggestion is to be allowed to add and index in string, like:
STR_4801 :{WHITE}{STRING:2} {CITY:1}
so, DecodeString() can fetch the right param (perhaps it will need a total DecodeString() rewrite)

BTW, why not the default sprintf() format?

[]'s
AbdullahYA

Posted: 31 Jul 2004 18:57
by Hadez
I had an idea to make an exception for STR_4801 (to allow this form: STR_4801 :{WHITE}{STRING} {CITY} )
I've already thought about some changes in the format of these regular expressions - wouldn't it be nice if there will be "<" and ">" (HTML- or XML-like) brackets instead of "{" and "}". I know some keyboard layouts in Windows doesn't have these characters (some Czech layouts).
The further thing in formatting of these strings (I can show that on an example): <white>&string; &city; - replacing another parentheses with "character entities"!
Use or refuse my ideas, but think about it for a moment :)

Edit: Maybe these are a bit stupid and unuseful ideas...