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 trap memorial and trigger messages for translation #71338

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

BrettDong
Copy link
Member

Summary

None

Purpose of change

memorial_male, memorial_female, trigger_message_u and trigger_message_npc are not extracted for translation in trap JSON definition:

{
    "//": "We're always going to need a 'nothing here' tile, we currently use traps for this.",
    "type": "trap",
    "id": "tr_ledge",
    "name": "ledge",
    "color": "i_cyan",
    "memorial_male": { "ctxt": "memorial_male", "str": "Fell down a ledge." },
    "memorial_female": { "ctxt": "memorial_female", "str": "Fell down a ledge." },
    "symbol": " ",
    "visibility": 0,
    "avoidance": 99999,
    "difficulty": 99,
    "action": "ledge",
    "vehicle_data": { "is_falling": true },
    "trigger_message_u": "You fell down a ledge!",
    "trigger_message_npc": "<npcname> fell down a ledge!"
  }

Describe the solution

Update string extractor script.

Describe alternatives you've considered

Testing

See new text appear in the generated translation template after the patch:

#. ~ Memorial message of trap "ledge"
#: data/core/traps.json
msgctxt "memorial_male"
msgid "Fell down a ledge."
msgstr ""

#. ~ Memorial message of trap "ledge"
#: data/core/traps.json
msgctxt "memorial_female"
msgid "Fell down a ledge."
msgstr ""

#. ~ Message when player triggers trap "ledge"
#: data/core/traps.json
msgid "You fell down a ledge!"
msgstr ""

#. ~ Message when NPC triggers trap "ledge"
#: data/core/traps.json
msgid "<npcname> fell down a ledge!"
msgstr ""

Additional context

@github-actions github-actions bot added Translation I18n Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [Python] Code made in Python labels Jan 29, 2024
@BrettDong BrettDong added <Bugfix> This is a fix for a bug (or closes open issue) 0.H Backport PR to backport to the 0.H stable release canddiate labels Jan 29, 2024
Copy link
Contributor

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • Triggered a teleport trap.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 29, 2024
@ZhilkinSerg ZhilkinSerg merged commit 77a3ce8 into CleverRaven:master Jan 30, 2024
22 checks passed
@BrettDong BrettDong deleted the translate-trap branch January 31, 2024 03:45
Procyonae pushed a commit to Procyonae/Cataclysm-DDA that referenced this pull request May 16, 2024
@Procyonae Procyonae mentioned this pull request May 16, 2024
dseguin added a commit that referenced this pull request May 16, 2024
@Procyonae Procyonae added 0.H Backported and removed 0.H Backport PR to backport to the 0.H stable release canddiate labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.H Backported astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. json-styled JSON lint passed, label assigned by github actions [Python] Code made in Python Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants