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

routes.js The translation is not displaying #7401

Closed
try496 opened this issue Nov 17, 2024 · 3 comments
Closed

routes.js The translation is not displaying #7401

try496 opened this issue Nov 17, 2024 · 3 comments

Comments

@try496
Copy link
Contributor

try496 commented Nov 17, 2024

How can we otherwise help?

I can see that Simplified Chinese and Polish are provided, but the translation is not displaying. This is after a fresh compilation and installation.

#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:96
#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:173
msgid ""
"A numeric table index, or symbol alias declared in %s. Special aliases local "
"(255), main (254) and default (253) are also valid"
msgstr "数值表索引,在 %s "
"中声明的符号别名。特殊别名local(255)、main(254)和default(253)是有效的"

#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:96
#: modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js:173
msgid ""
"A numeric table index, or symbol alias declared in %s. Special aliases local "
"(255), main (254) and default (253) are also valid"
msgstr ""
"Indeks tablicy numerycznej lub alias symbolu zadeklarowany w %s. Specjalne "
"aliasy local (255), main (254) i default (253) są również prawidłowe"

屏幕截图 2024-11-16 212912
屏幕截图 2024-11-17 150110

@try496
Copy link
Contributor Author

try496 commented Nov 17, 2024

Using OpenWrt 24.10 for the build.

@hnyman
Copy link
Contributor

hnyman commented Nov 17, 2024

It may be a coding error in

_('A numeric table index, or symbol alias declared in %s. Special aliases local (255), main (254) and default (253) are also valid'.format('<code>/etc/iproute2/rt_tables</code>'))

The translate function "_" has parentheses that cover also the contents of .format ...
The closing parentheses might need to be before .format

I am not sure if that is right, or should that just be split into three parts, two translated strings and untranslated code in between.

@hnyman
Copy link
Contributor

hnyman commented Nov 17, 2024

Yeah, looks like a recent error from @systemcrash in a9e1685

I will change the place of the erroneous parentheses:
_('A numeric table index, or symbol alias declared in %s. Special aliases local (255), main (254) and default (253) are also valid'.format('<code>/etc/iproute2/rt_tables</code>'))
-->
_('A numeric table index, or symbol alias declared in %s. Special aliases local (255), main (254) and default (253) are also valid').format('<code>/etc/iproute2/rt_tables</code>')

Then it works:
image

@hnyman hnyman closed this as completed in cfa774e Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants