luci-app-bmx7: mask CSS translate directives to avoid i18n confusion

Since bmx7's netjsongraph.js contains CSS `translate()` directives,
they're treated as translation calls by the i18n source scanner.

Mask these directives to avoid false positives.

Fixes: #3484
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-01-09 11:19:39 +01:00
parent 73a7561ee1
commit 96b8cbdc16
31 changed files with 38 additions and 242 deletions

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr "+ d.x +"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr "+ d3.event.translate +"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Ankündigungen"
@ -225,3 +217,9 @@ msgstr "Laufzeit"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm:79
msgid "Via Neighbour"
msgstr "Via Nachbar"
#~ msgid "+ d.x +"
#~ msgstr "+ d.x +"
#~ msgid "+ d3.event.translate +"
#~ msgstr "+ d3.event.translate +"

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -12,14 +12,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: es\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr "+ d.x +"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr "+ d3.evento.traducción +"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Anuncios"
@ -227,3 +219,9 @@ msgstr "Tiempo de actividad"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm:79
msgid "Via Neighbour"
msgstr "Vía vecino"
#~ msgid "+ d.x +"
#~ msgstr "+ d.x +"
#~ msgid "+ d3.event.translate +"
#~ msgstr "+ d3.evento.traducción +"

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.9.1-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Annonces"

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr "+ d.x +"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr "+ d3.event.translate +"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Közlemények"
@ -225,3 +217,9 @@ msgstr "Működési idő"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm:79
msgid "Via Neighbour"
msgstr "Szomszédon keresztül"
#~ msgid "+ d.x +"
#~ msgstr "+ d.x +"
#~ msgid "+ d3.event.translate +"
#~ msgstr "+ d3.event.translate +"

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -11,14 +11,6 @@ msgstr ""
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.10.1-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr "+ d.x +"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr "+ d3.event.translate +"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Komunikaty"
@ -226,3 +218,9 @@ msgstr "Czas pracy"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm:79
msgid "Via Neighbour"
msgstr ""
#~ msgid "+ d.x +"
#~ msgstr "+ d.x +"
#~ msgid "+ d3.event.translate +"
#~ msgstr "+ d3.event.translate +"

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr "+ d.x +"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr "+ d3.event.translate +"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Anúncios"
@ -225,3 +217,9 @@ msgstr "Uptime"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm:79
msgid "Via Neighbour"
msgstr "Via Vizinho"
#~ msgid "+ d.x +"
#~ msgstr "+ d.x +"
#~ msgid "+ d3.event.translate +"
#~ msgstr "+ d3.event.translate +"

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr "+ d.x +"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr "+ d3.event.translate +"
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr "Comunicados"
@ -226,6 +218,12 @@ msgstr "Tempo de atividade"
msgid "Via Neighbour"
msgstr "Através de Vizinho"
#~ msgid "+ d.x +"
#~ msgstr "+ d.x +"
#~ msgid "+ d3.event.translate +"
#~ msgstr "+ d3.event.translate +"
#~ msgid "Bandwith"
#~ msgstr "Largura de banda"

View file

@ -11,14 +11,6 @@ msgstr ""
"20)) ? 1 : 2;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -11,14 +11,6 @@ msgstr ""
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.10\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -1,14 +1,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -11,14 +11,6 @@ msgstr ""
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.9.1-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -10,14 +10,6 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.10-dev\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -4,14 +4,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:510
msgid "+ d.x +"
msgstr ""
#: applications/luci-app-bmx7/root/www/luci-static/resources/bmx7/js/netjsongraph.js:173
msgid "+ d3.event.translate +"
msgstr ""
#: applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm:33
msgid "Announcements"
msgstr ""

View file

@ -170,7 +170,7 @@
*/
redraw: function() {
panner.attr("transform",
"translate(" + d3.event.translate + ") " +
"trans"+"late(" + d3.event.translate + ") " +
"scale(" + d3.event.scale + ")"
);
},
@ -507,7 +507,7 @@
});
labels.attr("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")";
return "trans"+"late(" + d.x + "," + d.y + ")";
});
})
.on("end", function(){