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

[REQUEST] Allow currency abbreviations to be translated #641

Open
mkahvi opened this issue Aug 26, 2024 · 2 comments
Open

[REQUEST] Allow currency abbreviations to be translated #641

mkahvi opened this issue Aug 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mkahvi
Copy link
Contributor

mkahvi commented Aug 26, 2024

Is your feature request related to a problem? Please describe.
Abbreviated currency disregards localization by being hardcoded.

Describe the solution you'd like
Ability to define string and key for use in game.i18n.localize() instead of hardcoded string with string replacement shim.

For example

abbreviation: {
  i18n: "PF1.Currency.Abbr.gp"
  key: "gp"
}

Which then is called as

game.i18n.format(abbreviation.i18n, { [abbreviation.key]: 500 })

Or something to that effect. Should be flexible enough

Though I presume not all systems have currencies like that, so maybe just allow it to be a function?

Describe alternatives you've considered
Ignoring i18n problem is the only alternative.

@mkahvi mkahvi added the enhancement New feature or request label Aug 26, 2024
@mkahvi mkahvi changed the title [REQUEST] Currency abbreviations are hardcoded and ignore localization [REQUEST] Allow currency abbreviations to be translated Aug 26, 2024
@Haxxer
Copy link
Collaborator

Haxxer commented Aug 30, 2024

How would this work with the currency UI?

image

@mkahvi
Copy link
Contributor Author

mkahvi commented Aug 30, 2024

Would need separate handling for that I would think. Treat input in that UI as override to what's provided via the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@mkahvi @Haxxer and others