Skip to content
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

Sentences from .cfg files are not translated #2709

Open
illwieckz opened this issue May 21, 2023 · 3 comments
Open

Sentences from .cfg files are not translated #2709

illwieckz opened this issue May 21, 2023 · 3 comments
Labels
A-Translation Anything touching translation problems. Tightly coupled with A-UI T-Feature-Request Proposed new feature T-Improvement Improvement for an existing feature

Comments

@illwieckz
Copy link
Member

Example in pkg/unvanquished_src.dpkdir/configs/buildables/barricade.attr.cfg:

humanName         "Barricade"
description       "Living alien wall.
Absorbs large amounts of damage and obstructs movement.
Can shrink to allow aliens to pass over it."
@illwieckz
Copy link
Member Author

I don't want to write a custom parser for this to extract the strings, it's better if we use a standardized format with ready-to-use parsing libraries available for any language…

@slipher
Copy link
Contributor

slipher commented May 22, 2023

Some of the files (those using Parse_LoadSourceHandle) have C processor functionality enabled, so we could define the N_ macro there. But many .cfg files don't use that parser, so it's probably a bad idea.

On the other hand almost all files have C/C++ comments enabled, so we could define a custom marker using a comment e.g. /*T*/ before the string constant. A custom parser would be less than 10 lines in our Python script, so we hardly need to worry about that.

@ghost
Copy link

ghost commented Jun 19, 2023

I think we should drop that weird format of us for config files and move to something more ini-style, or maybe deb822 format. This would be much easier to parse as those are just key-value based.

I even have some work on that around, which includes moving hard-coded values such as range or obituaries into the weaponAttr_t struct, which have the side effect to make bots more aware of gameplay rules without having to duplicate hard-coded values.

In regard of translations, that would basically mean, load the "normal" config files, and then load the translation config files, which would overwrite some fields such as name, description, and the likes.

@slipher slipher added T-Improvement Improvement for an existing feature T-Feature-Request Proposed new feature A-Translation Anything touching translation problems. Tightly coupled with A-UI labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Translation Anything touching translation problems. Tightly coupled with A-UI T-Feature-Request Proposed new feature T-Improvement Improvement for an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants