-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool: translation compiler #1299
Comments
In my opinion, we should take this project as an opportunity to go standard:
|
|
@fernewelten this particular task is only to separate existing logic from the editor so that it could be run separately, that's it really. It's also meant for ags3 branch too and work with existing project sources. To elaborate, this is a part of parent task of decoupling certain functions from the Editor to be able to run game compilation without GUI and .NET. Any changes to source format should be a separate feature task, and considered whether it's best to add to ags3 or ags4. Of course the separation of this procedure from the editor may make it easier to transition to the new format. |
I think |
I'd suggest:
In one go, i.e., as a single, unified task. |
I cannot do this within this task, because this is a part of parent problem of decoupling compilation procedure from the editor. This does not assume any change in formats and has to maintain full compatibility with the existing 3.* projects and 3.* editor. Any further changes has to be a separate task, as these involve larger changes to all parts of the project: editor, tools, and maybe engine too (I am not sure what will be engine's data from your explanation). |
The .TRS format wouldn't (and shouldn't) change in any way. A .PO file isn't anything spectacular at all. To quote from the docs:
That is, from the vantage point of the translator:
From the vantage point of the generating program:
From the vantage point of the reading program (in the simplest case):
|
@fernewelten i'm sorry, but I will make this tool as planned in any case for ags3 branch, because the plan was to fist of all have a set of tools working with existing projects. There's another reason, I believe we are rather close to achieving this milestone (stand-alone tool chain for the game compilation), and I won't like to distract from the set path right now. If you think PO format is beneficial then we may open a new task for doing what's necessary to transit there. Perhaps it will be aimed at ags4 branch, but this may be argued to be done in ags3 too.
I'm not sure if I understand... could be that you mistake TRS and TRA? TRS is the current translation source (basically a txt file), TRA is a compiled data for the engine. From your explanation I assumed you meant replacing TRS with PO. Or was I wrong perhaps? |
As a step of decoupling game compilation procedure from the Editor, we need a stand-alone tool that is run from the command-line, parses a translation source (TRS) file and writes a compiled translation (TRA) file in binary format.
Should be written in the similar line with the existing tools, in C++ (#1262, #1264, #1269).
Name suggestion:
trac
(TRAnslation Compiler).NOTE: this task is exclusively in writing this tool, adjusting Editor is a separate task, so no need to concern yourself with that if you are doing this. In fact it's best to assume that Editor will not be present to ensure tool's work result has no reliance on it.
Input:
Output
Details
The algorithm is relatively simple, most of TRS is just pairs of text lines that form a key/value map, with a few exceptions (comments, options).
Current implementation of reading and writing TRS in the Editor may be found here:
https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Types/Translation.cs
Implementation of the TRA writer in the Editor may be found here: https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Editor/Components/TranslationsComponent.cs#L92
User documentation of TRS format:
https://github.com/adventuregamestudio/ags-manual/wiki/Translations
The existing Tool code in the current master branch:
https://github.com/adventuregamestudio/ags/tree/master/Tools
MSVS solution for standalone tools:
https://github.com/adventuregamestudio/ags/blob/master/Solutions/Tools.sln
The text was updated successfully, but these errors were encountered: