For the dude that was writing a C++ compiler (and anyone else interested) you should check this out:
C++ Grandmaster Certification: [URL]http://www.cppgm.org[/URL]
It's basically an online course that will teach you and have you write your own C++11 compiler from [I]scratch[/I] (no third party dependencies allowed).
I'm working on a localization tool.
It extracts strings from a .csproject or a bunch of .cs files and then replaces them with with either string aliases or constant numbers.
Console.WriteLine("hello");
Will be converted to
Console.WriteLine(Locale.Strings["#greeting"]);
Obviously it also generates a XML file with the original strings and the "Locale" class for you.
I started it because I'm not really a fan of all the existing localization features.
The official "resource" way is unnecessary complex and doesn't allow others to provide you with localizations easily.
Also I don't like having to change strings in a file/other window when needed.
With my tool I can delay the localization until the project is finished!
What do you guys think about this? Good idea?
Maybe I'll release it here after some polishing
[QUOTE=Felheart;39435475]I'm working on a localization tool.
It extracts strings from a .csproject or a bunch of .cs files and then replaces them with with either string aliases or constant numbers.
Console.WriteLine("hello");
Will be converted to
Console.WriteLine(Locale.Strings["#greeting"]);
Obviously it also generates a XML file with the original strings and the "Locale" class for you.
I started it because I'm not really a fan of all the existing localization features.
The official "resource" way is unnecessary complex and doesn't allow others to provide you with localizations easily.
Also I don't like having to change strings in a file/other window when needed.
With my tool I can delay the localization until the project is finished!
What do you guys think about this? Good idea?
Maybe I'll release it here after some polishing[/QUOTE]
Nice idea but it's really inflexible as it is right now. What if the string is "Hello"? Will you have a specialized capitalized greeting? What about "hi", "hey"... stuff like that.
Instead of using a Dictionary, you should use a function that did some logic on the input string before returning a value.
[QUOTE=Darwin226;39435539]Nice idea but it's really inflexible as it is right now. What if the string is "Hello"? Will you have a specialized capitalized greeting? What about "hi", "hey"... stuff like that.
Instead of using a Dictionary, you should use a function that did some logic on the input string before returning a value.[/QUOTE]
You are right in saying that it only uses a dictionary (or another type of lookup which is essentially the same for this purpose).
But I don't really get what feature is missing?
Do you mean it can't handle situations like this: "Hello Username, it's monday"
In that case I'd use a format string: "Hello {0}, it's {1}".
Or do you want a randomized greeting? So it sometimes displays "hi user, ..." and sometimes "hey user,..." in that case you'd need multiple aliases anyway (#greeting1, #greeting2, etc.)
Also I don't think using the standard resource file provides your requested functionality.
To be honest I don't really understand what's missing :(
But if you explain in more detail and/or provide an example of the problem, I'd be really happy to add a feature!!
Conna please remove the ding for notifications or make it quieter/lower pitched it is so obnoxious in its current state. The rest of your work looks good keep it up.
Designer of the game I am working on was interviewed by Rock Paper Shotgun [URL="http://www.rockpapershotgun.com/2013/01/31/offworld-survival-refactored-explain-unclaimed-world/#more-140870"]today[/URL]
[QUOTE=Felheart;39435616]You are right in saying that it only uses a dictionary (or another type of lookup which is essentially the same for this purpose).
But I don't really get what feature is missing?
Do you mean it can't handle situations like this: "Hello Username, it's monday"
In that case I'd use a format string: "Hello {0}, it's {1}".
Or do you want a randomized greeting? So it sometimes displays "hi user, ..." and sometimes "hey user,..." in that case you'd need multiple aliases anyway (#greeting1, #greeting2, etc.)
Also I don't think using the standard resource file provides your requested functionality.
To be honest I don't really understand what's missing :(
But if you explain in more detail and/or provide an example of the problem, I'd be really happy to add a feature!![/QUOTE]
Maybe I missed the point. From what I understand you're making a tool that adds localization options to any project. So if someone wrote a game that has English strings, your program will find them and replace them with a table lookup so that you could swap languages easily.
Where I think I got it wrong is the amount of automation that would go into this. Because to make it fully automatic you would actually need to write a translator.
In the example you provide, wouldn't your program replace the "Hello" word with a localization lookup but leave "it's" unchanged?
[QUOTE=HTF;39435669]Conna please remove the ding for notifications or make it quieter/lower pitched it is so obnoxious in its current state. The rest of your work looks good keep it up.[/QUOTE]
Thanks for the feedback, I'll make it quieter. Also, if you know of any royalty free shotgun sounds which sound better than mine, please let me know! (The current shotgun sound is tinny and horrible.)
[QUOTE=Darwin226;39435726]Maybe I missed the point. From what I understand you're making a tool that adds localization options to any project. So if someone wrote a game that has English strings, your program will find them and replace them with a table lookup so that you could swap languages easily.
Where I think I got it wrong is the amount of automation that would go into this. Because to make it fully automatic you would actually need to write a translator.
In the example you provide, wouldn't your program replace the "Hello" word with a localization lookup but leave "it's" unchanged?[/QUOTE]
Ahh, no. It only searchs complete strings,not only parts, then replaces them by a lookup.
The lookup table will be populated from a XML file when the program starts.
It's more or less the same as with microsofts resource kind of solution.
But my approach finds strings automatically, generates the lookup-class and the corrosponding xml file automatically.
It also has heuristics to guess which string should be localized or not.
For example stuff like "propertyGrid1", "label1" is listed in the selection grid, but not initially selected.
It even detects if a string is part of an Attribute, for example in [DllImport("kernel32.dll", ...)] it won't add "kernel32.dll" to the list of strings.
But you could (in theory) let an online translator translate the initial XML file and then optimize / fix it's output.
Ohhh. That makes much more sense. Nice job!
Wait a minute. It's not January anymore!
Nope, so who wants to take on the task of making the new thread?
Sorry, you need to Log In to post a reply to this thread.