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

chore: add display name to chest prefab #5

Merged
merged 2 commits into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/i18n/game.lang
@@ -0,0 +1,3 @@
{
"furnishings-chest": "Chest"
}
3 changes: 3 additions & 0 deletions assets/i18n/game_de.lang
@@ -0,0 +1,3 @@
{
"furnishings-chest": "Kiste"
}
3 changes: 3 additions & 0 deletions assets/i18n/game_en.lang
@@ -0,0 +1,3 @@
{
"furnishings-chest": "Chest"
}
3 changes: 3 additions & 0 deletions assets/prefabs/furnishings/chest.prefab
@@ -1,4 +1,7 @@
{
"DisplayName": {
"name": "${coreadvancedassets:game#furnishings-chest}"
Copy link
Contributor

Choose a reason for hiding this comment

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

One drawback of this approach is that if a screen just renders this value as a text without an explicit call to TranslationSystem#translate(...) this unreadable string will show up...

I don't understand (yet) why using this reference string in a .ui file directly is automatically translated, but we return this string in a programmatic binding it is not. 🤔

See https://github.com/Terasology/Inventory/pull/45/files#diff-04de2f5098d10bdd839f6f8c99d30807432d03ca23c6eebe36ab5a715341109bR11

},
"InventoryAccess": {
"input": {
"top": "0..29",
Expand Down