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

Extract comments for translators #2245

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

aBlueShadow
Copy link
Contributor

This enables the add-comment option in gettext, that allows scenario writers and c++ coders to give translators detailed information about a given text.

Example how it works:

Right before the line that contains a translation string, add a comment that contains the TRANSLATORS keyword (case matters)

-- TRANSLATORS: F is formation spacing of the drones, S is their scan range
addGMFunction(string.format(_("buttonGM", "+Distance F%.1fU S%.1fU"),drone_formation_spacing/1000,drone_scan_range_for_flags/1000),setDroneDistances)

After the update/creation of the base translation files, that comment now got added to the .po file, which will look like this in Poedit:

poedit-snippet

@daid daid merged commit aa63f16 into daid:master Nov 21, 2024
7 checks passed
@aBlueShadow aBlueShadow deleted the extracted_comments branch November 23, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants