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

Missing translation on the PreviewDialog.gd #326

Open
GustavoLR548 opened this issue Sep 27, 2024 · 1 comment
Open

Missing translation on the PreviewDialog.gd #326

GustavoLR548 opened this issue Sep 27, 2024 · 1 comment
Labels
bug Something isn't working ui Related to the UI
Milestone

Comments

@GustavoLR548
Copy link

Describe the bug
In the PreviewDialog.gd there is a text that is not possible to translate and that should be "translatable", which is the text that displays what was loaded from the preview window

To Reproduce
Steps to reproduce the behavior:

  1. Go to tabletop-club/game/Scripts/Game/UI/Dialogs/PreviewDialog.gd

See line 70 and 72 where the text is changed

	if num_pieces == 0:
		pass
	elif num_pieces == 1:
		_status.text = status_text_one % entry_name
	else:
		_status.text = status_text_multiple % previews_selected.size()

Expected behavior

Change to this, and add the possibility to translate the "Loaded %s." and "Loaded %d assets."

	if num_pieces == 0:
		pass
	elif num_pieces == 1:
		_status.text = tr(status_text_one) % entry_name
	else:
		_status.text = tr(status_text_multiple) % previews_selected.size()

Screenshots
See Expected Behavior

Environment
Windows 10 Pro 22H2

Version
master

Additional context

@drwhut
Copy link
Owner

drwhut commented Sep 27, 2024

Ah, good spot! I thought that the strings would have been translatable since they appear in the translation templates, but apparently the variables being exported isn't enough for Godot to actually replace them at runtime...

I've recently re-written the entire window that this script references, so this should not longer be a problem when the re-write is merged into the master branch.

@drwhut drwhut added bug Something isn't working ui Related to the UI labels Sep 27, 2024
@drwhut drwhut added this to the v0.2.0 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Related to the UI
Projects
None yet
Development

No branches or pull requests

2 participants