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

Update Translate Complex Dialogue mod #77996

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

Uwuewsky
Copy link
Contributor

Summary

Infrastructure "Script for updating Translate Complex Dialogue mod"

Purpose of change

Tried to update the mod manually and replace monolithic strings with concatenation, oaoaasdjs too much work, wrote a script for semi-automatic update.

Describe the solution

This update script uses up-to-date strings and //~ comments as "translation":

  "id": "TALK_EXODII_MERCHANT_TalkJob",
  "type": "talk_topic",
  "dynamic_line": {
    "//~": "Business before pleasure.  What do you need?",
    "str": "Aye, business afore, 'tis said.  What'll ye tass to ol' Rubik?"
vvvvvvvvvvvvvvvvvvvvvvvvv
  "id": "TALK_EXODII_MERCHANT_TalkJob",
  "type": "talk_topic",
  "dynamic_line": {
    "concatenate": [
      "Aye, business afore, 'tis said.  What'll ye tass to ol' Rubik?",
      "\"\n\n[TRANSLATE:] \"",
      "Business before pleasure.  What do you need?"

Usage:

  • cd path/to/Cataclysm-DDA/
  • python3 tools/json_tools/update-translate-dialogue-mod.py
  • then lint via json_formatter.cgi, check doc/JSON_STYLE.md
  • You can also add "//": "mod_update_script_compact" to dynamic lines to make the script concatenate that line more compactly and without newlines, which is useful if the original dialog also uses concatenation.

Describe alternatives you've considered

Testing

Game loads, dialogs work correctly. Looked at script output to see that it doesn't create invalid constructs as far as I can see.
rubik1
rubik2

Reuse of existing translations:
rubik3

Compact version (the space at the beginning was added later):
rubik4

Additional context

@github-actions github-actions bot added Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON [Markdown] Markdown issues and PRs [Python] Code made in Python Code: Tooling Tooling that is not part of the main game but is part of the repo. astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Nov 19, 2024
data/json/npcs/exodii/exodii_merchant_talk.json Outdated Show resolved Hide resolved
data/json/npcs/exodii/exodii_merchant_talk.json Outdated Show resolved Hide resolved
data/json/npcs/exodii/exodii_merchant_talk.json Outdated Show resolved Hide resolved
data/json/npcs/exodii/exodii_merchant_talk.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 20, 2024
@Maleclypse
Copy link
Member

It won't let me resolve conflicts. I was trying to find a better translation for steel of the lake but no one knows what the heck Rubik meant by that anymore.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @jbytheway

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 4, 2024
Co-authored-by: Valiant <[email protected]>
Co-authored-by: Maleclypse <[email protected]>
Copy link
Contributor

github-actions bot commented Dec 4, 2024

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

Click to expand
  • *sounds thoughtful. "This'n can't make a call o' the quarter. The stompers be a king's necklace, and the manufactory don't run on dreams. Mayhap when us'n be more on the solid, but for the tick and tumble, no."
  • Aside from just having a safe place to live? We're here to mine, you understand. Picking the scraps, seeing if this world has any tech worth reverse engineering. No sense letting good scraps go to waste. If we're lucky, maybe we'll get some new Exodii before we teleport out. Pickin' up the pieces of our sweet, shattered dreams, such as they are.
  • It's a bit of a surprise, isn't it? Before we came here, we were in a place about 600 years earlier in time, or so. We landed in the middle of a war that turned wrong when the dead started joining back in. Truth be told, not a very unusual situation. The Enemy makes us fight. By and by, we came in, and by then the killing fields were ready for us to harvest their bronze. It's not Avalonian steel, but it's a good strong metal for stopping a nibbling mouth, so we kept some of their armor and weapons to trade.
  • Nah, mate, still operatin'.

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.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 14, 2024
@Maleclypse Maleclypse merged commit 2e504ae into CleverRaven:master Dec 15, 2024
21 of 25 checks passed
@Uwuewsky Uwuewsky deleted the update-exodii-mod branch December 15, 2024 08:16
b3brodie pushed a commit to b3brodie/Cataclysm-DDA that referenced this pull request Dec 16, 2024
* Update Translate Complex Dialogue mod

* Apply suggestions

Co-authored-by: Valiant <[email protected]>
Co-authored-by: Maleclypse <[email protected]>

* Remove old file

---------

Co-authored-by: Valiant <[email protected]>
Co-authored-by: Maleclypse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Code: Tooling Tooling that is not part of the main game but is part of the repo. <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs [Python] Code made in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants