cockpit-project / cockpit-machines

Cockpit UI for virtual machines
GNU Lesser General Public License v2.1
257 stars 67 forks source link

po: Don't mark JavaScript strings as c-format #1691

Closed martinpitt closed 2 weeks ago

martinpitt commented 2 weeks ago

We don't use printf-style C format macros like "%s" in the JavaScript code, at least not for translations. But xgettext interprets the "$0% Free" in pkg/kubernetes/scripts/nodes.js as C format string, which confuses translation tools and blocks the proper translation of this string.

As there doesn't seem to be a way to change the --keyword=ngettext argument to do that, just filter out the c-format tag with sed.

Taken from https://github.com/cockpit-project/cockpit/commit/449d76c0e6d9


See https://github.com/cockpit-project/cockpit-podman/issues/1712