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

"pike" is ambiguous #34263

Closed
Aloxaf opened this issue Sep 27, 2019 · 6 comments · Fixed by #34365
Closed

"pike" is ambiguous #34263

Aloxaf opened this issue Sep 27, 2019 · 6 comments · Fixed by #34365
Labels
<Bug> This needs to be fixed Good First Issue This is a good first issue for a new contributor Items / Item Actions / Item Qualities Items and how they work and interact Monsters Monsters both friendly and unfriendly. Translation I18n

Comments

@Aloxaf
Copy link
Contributor

Aloxaf commented Sep 27, 2019

Describe the bug

There is a monster named "pike", and there is also a weapon named "pike".
And there is no context to distinguish them, which makes it impossible to create a correct translation for both in most language at the same time.

Steps To Reproduce

  1. Spawn an item "pike"
  2. Spawn a monster "pike"
  3. Change language to others (eg. Chinese)
  4. You will find they have the same translation.

Expected behavior

They should have different translation. So they should have different name, or in different context.

Screenshots

N/A

Versions and configuration

  • OS: Arch Linux
  • Game Version: 0.D-7905-g384dcdbbd3
  • Graphics version: Tiles
  • Mods loaded: [ "dda", "no_npc_food" ]

Additional context

The weapon "pike" was previously called "awl pike", see #30591

@Night-Pryanik Night-Pryanik added <Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact Monsters Monsters both friendly and unfriendly. Translation I18n labels Sep 27, 2019
@ZhilkinSerg
Copy link
Contributor

Just add context to both json files:

"name": { "ctxt": "item", "str": "pike" }
"name": { "ctxt": "monster", "str": "pike" }

@ZhilkinSerg ZhilkinSerg added the Good First Issue This is a good first issue for a new contributor label Sep 27, 2019
@Qrox
Copy link
Contributor

Qrox commented Sep 27, 2019

Just add context to both json files:

It needs first updating the c++ code of itype and mtype.

@ZhilkinSerg
Copy link
Contributor

Just add context to both json files:

It needs first updating the c++ code of itype and mtype.

Is it not using translation yet and treated as a plain string?

@Qrox
Copy link
Contributor

Qrox commented Sep 27, 2019

Yes, and also because they have plural forms so I'll have to add plural support to the translation class.

@Barhandar
Copy link
Contributor

Is explicit context declaration instead of it being inferred from the TYPE really necessary?

@Qrox
Copy link
Contributor

Qrox commented Sep 30, 2019

It was necessary in #26402 where the same string in the same type of json object needed different translations in different contexts, so I'm doing it this way for consistency. Furthermore, there are thousands of item names. If the context was changed to be inferred from the type, translators would have to re-confirm every translations of these strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Good First Issue This is a good first issue for a new contributor Items / Item Actions / Item Qualities Items and how they work and interact Monsters Monsters both friendly and unfriendly. Translation I18n
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants