update pot generators
authorMazet Laurent <mazet@softndesign.org>
Sat, 8 Aug 2026 21:21:25 +0000 (23:21 +0200)
committerMazet Laurent <mazet@softndesign.org>
Mon, 10 Aug 2026 20:32:21 +0000 (22:32 +0200)
l10n/Makefile
l10n/pot/alert.pot
l10n/pot/board.pot
l10n/pot/index.pot [new file with mode: 0644]
l10n/pot/trivabble.pot
lang-dists-extractor/Makefile
public/trivabble.js

index b1b43655f558241dbad2cf95688af0ebc7d5c9b8..55579c3e16d5b7318660a812e60174ca7e9e8550 100644 (file)
@@ -2,9 +2,46 @@
 
 .EXPORT_ALL_VARIABLES:
 
-ROOT_LANG = ../public/l10n
+POTFILES = pot/alert.pot pot/board.pot pot/index.pot pot/trivabble.pot
+LANGBOARDS = $(wildcard ../server/lang/*.json)
+
+ROOT = ../public
+ROOT_LANG = $(ROOT)/l10n
 
 all: lang
 
+pot-files: $(POTFILES)
+
+UNIQ = awk -F\" '/msgid/ { if (t[$$2]) s=3; else t[$$2]=1 } { if (--s < 0) print }'
 lang:
        node makejs.js
+
+pot/alert.pot:pot/%.pot: $(ROOT)/%.js
+       awk 'BEGIN { print "#TranslationFunction myAlert" } \
+           /_\("/ { sub(/.*_\("/, ""); sub(/"\).*/, ""); \
+            printf "\nmsgid  \"%s\"\nmsgstr \"\"\n", $$0 }' $< | \
+            $(UNIQ) > $@
+
+pot/board.pot: $(LANGBOARDS)
+       awk -F\" 'BEGIN { print "#TranslationFunction trivabble" } \
+        /name/ {printf "\nmsgid  \"%s\"\nmsgstr \"\"\n", $$4 }' $^ | \
+        $(UNIQ) > $@
+
+pot/index.pot:pot/%.pot: $(ROOT)/%.html
+       awk -F\> 'BEGIN { print "#TranslationFunction trivabble" } \
+           { for (i=1; i<=NF; i++) \
+            if ($$(i) ~ /data-l10n/) { \
+                if ($$(i) ~ /text-content/) {\
+                    msg=$$(i+1); sub(/<.*/, "", msg) } \
+                else { \
+                    msg=r=$$(i); \
+                    sub(/.*data-l10n="/, ".*", r); sub(/[",].*/, "=\"", r); \
+                    sub(r, "", msg); sub(/".*/, "", msg) } \
+                printf "\nmsgid  \"%s\"\nmsgstr \"\"\n", msg } }' $< | \
+                $(UNIQ) > $@
+
+pot/trivabble.pot:pot/%.pot: $(ROOT)/%.js
+       awk 'BEGIN { print "#TranslationFunction trivabble" } \
+           /_\("/ { sub(/.*_\("/, ""); sub(/"\).*/, ""); \
+            printf "\nmsgid  \"%s\"\nmsgstr \"\"\n", $$0 }' $< | \
+            $(UNIQ) > $@
index 793ed597004166d4dd2bebe3055741d9dfbecf61..d32046eab8528437f56ae3a6e368ce65e3a17a8f 100644 (file)
@@ -3,11 +3,15 @@
 msgid  "OK"
 msgstr ""
 
+msgid  "Cancel"
+msgstr ""
+
+msgid  "alert-confirm"
+msgstr ""
+
 msgid  "Yes"
 msgstr ""
 
 msgid  "No"
 msgstr ""
 
-msgid  "Cancel"
-msgstr ""
index 4758b747f516b09c1bcf6382f9be2be33fc51101..10e3f35b965be88b9d1887506f23ee0981ddc5db 100644 (file)
@@ -9,36 +9,66 @@ msgstr ""
 msgid  "Bulgarian"
 msgstr ""
 
+msgid  "Bulgarian optimized"
+msgstr ""
+
 msgid  "Breton"
 msgstr ""
 
+msgid  "Breton optimized"
+msgstr ""
+
 msgid  "Catalan"
 msgstr ""
 
+msgid  "Catalan optimized"
+msgstr ""
+
 msgid  "Czech"
 msgstr ""
 
 msgid  "Welsh"
 msgstr ""
 
+msgid  "Welsh optimized"
+msgstr ""
+
 msgid  "Danish"
 msgstr ""
 
+msgid  "Danish optimized"
+msgstr ""
+
 msgid  "German"
 msgstr ""
 
+msgid  "German optimized"
+msgstr ""
+
 msgid  "Greek"
 msgstr ""
 
+msgid  "Greek optimized"
+msgstr ""
+
 msgid  "English"
 msgstr ""
 
+msgid  "English optimized"
+msgstr ""
+
 msgid  "Esperanto"
 msgstr ""
 
+msgid  "Esperanto optimized"
+msgstr ""
+
 msgid  "Spanish"
 msgstr ""
 
+msgid  "Spanish optimized"
+msgstr ""
+
 msgid  "Estonian"
 msgstr ""
 
@@ -51,27 +81,45 @@ msgstr ""
 msgid  "French"
 msgstr ""
 
+msgid  "French optimized"
+msgstr ""
+
 msgid  "Irish"
 msgstr ""
 
+msgid  "Irish optimized"
+msgstr ""
+
 msgid  "Hebrew"
 msgstr ""
 
 msgid  "Croatian"
 msgstr ""
 
+msgid  "Croatian optimized"
+msgstr ""
+
 msgid  "Hungarian"
 msgstr ""
 
 msgid  "Armenian"
 msgstr ""
 
+msgid  "Armenian optimized"
+msgstr ""
+
 msgid  "Icelandic"
 msgstr ""
 
+msgid  "Icelandic optimized"
+msgstr ""
+
 msgid  "Italian"
 msgstr ""
 
+msgid  "Italian optimized"
+msgstr ""
+
 msgid  "Latin"
 msgstr ""
 
@@ -81,41 +129,74 @@ msgstr ""
 msgid  "Latvian"
 msgstr ""
 
+msgid  "Latvian optimized"
+msgstr ""
+
 msgid  "Malay"
 msgstr ""
 
 msgid  "Dutch"
 msgstr ""
 
+msgid  "Dutch optimized"
+msgstr ""
+
 msgid  "Norwegian"
 msgstr ""
 
+msgid  "Norwegian optimized"
+msgstr ""
+
 msgid  "Polish"
 msgstr ""
 
+msgid  "Polish optimized"
+msgstr ""
+
 msgid  "Portuguese"
 msgstr ""
 
+msgid  "Portuguese optimized"
+msgstr ""
+
 msgid  "Romanian"
 msgstr ""
 
+msgid  "Romanian optimized"
+msgstr ""
+
 msgid  "Russian"
 msgstr ""
 
+msgid  "Russian optimized"
+msgstr ""
+
 msgid  "Slovak"
 msgstr ""
 
+msgid  "Slovak optimized"
+msgstr ""
+
 msgid  "Slovenian"
 msgstr ""
 
+msgid  "Slovenian optimized"
+msgstr ""
+
 msgid  "Swedish"
 msgstr ""
 
+msgid  "Swedish optimized"
+msgstr ""
+
 msgid  "Turkish"
 msgstr ""
 
 msgid  "Ukrainian"
 msgstr ""
 
+msgid  "Ukrainian optimized"
+msgstr ""
+
 msgid  "Klingon"
 msgstr ""
diff --git a/l10n/pot/index.pot b/l10n/pot/index.pot
new file mode 100644 (file)
index 0000000..372fbec
--- /dev/null
@@ -0,0 +1,163 @@
+#TranslationFunction trivabble
+
+msgid  "Join adversaries"
+msgstr ""
+
+msgid  "Leave current game"
+msgstr ""
+
+msgid  "Restart"
+msgstr ""
+
+msgid  "Game number:"
+msgstr ""
+
+msgid  "(pending)"
+msgstr ""
+
+msgid  "You are:"
+msgstr ""
+
+msgid  "(name to give)"
+msgstr ""
+
+msgid  "Change"
+msgstr ""
+
+msgid  "Write a message to your adversaries here"
+msgstr ""
+
+msgid  "Send message"
+msgstr ""
+
+msgid  "Interface:"
+msgstr ""
+
+msgid  "Board:"
+msgstr ""
+
+msgid  "Configuration: "
+msgstr ""
+
+msgid  "Settings"
+msgstr ""
+
+msgid  "Theme:"
+msgstr ""
+
+msgid  "Auto"
+msgstr ""
+
+msgid  "Dark"
+msgstr ""
+
+msgid  "Light"
+msgstr ""
+
+msgid  "Show the timer"
+msgstr ""
+
+msgid  "Sound of the tiles"
+msgstr ""
+
+msgid  "Sound of messages"
+msgstr ""
+
+msgid  "Enable first word verification"
+msgstr ""
+
+msgid  "Freeze tiles after playing"
+msgstr ""
+
+msgid  "Disable the spell checker"
+msgstr ""
+
+msgid  "Spell checking is not available for this language."
+msgstr ""
+
+msgid  "Double tap duration:"
+msgstr ""
+
+msgid  "(fast)"
+msgstr ""
+
+msgid  "(slow)"
+msgstr ""
+
+msgid  "Flash light duration:"
+msgstr ""
+
+msgid  "Flash light color"
+msgstr ""
+
+msgid  "Cell captions:"
+msgstr ""
+
+msgid  "Clip when overflow"
+msgstr ""
+
+msgid  "Dots when overflow"
+msgstr ""
+
+msgid  "No caption"
+msgstr ""
+
+msgid  "Short caption"
+msgstr ""
+
+msgid  "Turn:"
+msgstr ""
+
+msgid  "Participant"
+msgstr ""
+
+msgid  "Rack"
+msgstr ""
+
+msgid  "Score"
+msgstr ""
+
+msgid  "Turn"
+msgstr ""
+
+msgid  "Waiting for other participants…"
+msgstr ""
+
+msgid  "Put back all the tiles of&#10;your rack in the bag"
+msgstr ""
+
+msgid  "Show my rack to other players"
+msgstr ""
+
+msgid  "Check spelling for new words"
+msgstr ""
+
+msgid  "Score new words"
+msgstr ""
+
+msgid  "Tip!"
+msgstr ""
+
+msgid  "Click on the bag to take one tile."
+msgstr ""
+
+msgid  "Click on someone's score&#10;to change it."
+msgstr ""
+
+msgid  "Who's turn? Click on the Turn button!"
+msgstr ""
+
+msgid  "Click on (+) to increase someone's score."
+msgstr ""
+
+msgid  "Show a cell to everyone by double-clicking on it."
+msgstr ""
+
+msgid  "To measure playing time, activate the timer."
+msgstr ""
+
+msgid  "Next tip"
+msgstr ""
+
+msgid  "Spell checking is based on:"
+msgstr ""
index 2cb91f9feedb3cf5115b8bb8bb73b79597ade28a..b8757826b6ef584e677ee103731d1edc78b0b56c 100644 (file)
 #TranslationFunction trivabble
 
-msgid  "Info & source code at {0}"
-msgstr ""
-
-msgid  "Your game is not over. Are you sure you want to leave now?"
-msgstr ""
-
-msgid  "You are about to leave the current game. To recover it, please note its number: {0}"
-msgstr ""
-
-msgid  "Sorry, a problem just happened. The page must be reloaded. If the problem is not too serious, you should be able to keep playing normally. Otherwise, contact the person who is able to fix the problem. Click on “Yes” to reload the page."
-msgstr ""
-
-msgid  "Enter the new score of {0}:"
-msgstr ""
-
-msgid  "Enter the score to add to {0}:"
-msgstr ""
-
-msgid  "To join a game, please give the number which is displayed on your adversary(ies)' screen.\nIf you do not know it, ask them.\n\nWarning: your adversary must not take your number, (s)he must keep his/her own."
-msgstr ""
-
-msgid  "It seems your did not give a correct number, or you clicked on “Cancel”. As a result, the current game continues, if any. To join a game, click on “Join a game” again."
-msgstr ""
-
-msgid  "To change your name, enter a new one. You can keep using your current name by cancelling. Please note that if you change your name and you have games in progress, you will not be able to keep playing them anymore unless you get back to your current name."
-msgstr ""
-
-msgid  "You cannot take another tile: your rack is full."
-msgstr ""
-
-msgid  "Are you sure you want to put all the tiles back in the bag (in order to play another game)? This will also clear the chat history."
-msgstr ""
-
-msgid  "Are you sure you want to put all your tiles back in the bag?"
+msgid  "Whoops, there is a problem. We are trying to fix it as soon as possible. Please wait a few seconds. If it persists, please contact the person who is able to fix the problem."
 msgstr ""
 
-msgid  "It seems your did not give your name. You need to do it for the game to run properly."
+msgid  "Spell checking requires Trivabble to download a dictionary. Do you confirm?"
 msgstr ""
 
-msgid  "Hello! To begin, enter your name. Your adversaries will see this name when you play with them."
+msgid  "Incorrect dictionary file."
 msgstr ""
 
-msgid  "Double\nLetter"
+msgid  "Can't load dictionary file."
 msgstr ""
 
-msgid  "Double\nWord"
+msgid  "The problem is solved, sorry for the inconvenience!"
 msgstr ""
 
-msgid  "Triple\nLetter"
+msgid  "Your game is not over. Are you sure you want to leave now?"
 msgstr ""
 
-msgid  "Triple\nWord"
+msgid  "To continue playing, click here"
 msgstr ""
 
-msgid  "Join adversaries"
+msgid  "Sorry, a problem just happened. The page must be reloaded. If the problem is not too serious, you should be able to keep playing normally. Otherwise, contact the person who is able to fix the problem. Click on “Yes” to reload the page."
 msgstr ""
 
-msgid  "You are:"
+msgid  "{0}: "
 msgstr ""
 
-msgid  "Change"
+msgid  "{0} shows their rack:"
 msgstr ""
 
-msgid  "(name to give)"
+msgid  "You changed the board to {0} for language {1}"
 msgstr ""
 
-msgid  "Restart"
+msgid  "{0} changed the board to {1} for language {2}"
 msgstr ""
 
-msgid  "Game number:"
+msgid  "Caution, this feature is experimental; any feedback will be appreciated"
 msgstr ""
 
-msgid  "(pending)"
+msgid  "First word must cover center box."
 msgstr ""
 
-msgid  "Write a message to your adversaries here"
+msgid  "Enter the new score of {0}:"
 msgstr ""
 
-msgid  "Send message"
+msgid  "Enter the score to add to {0}:"
 msgstr ""
 
-msgid  "Sound of the tiles"
+msgid  "{0} changed their name to {1}"
 msgstr ""
 
-msgid  "Sound of messages"
+msgid  "Sorry to disturb you, but we need to reload the game so you can continue playing. You will not lose anything except the messages in the chat. Are you ready?"
 msgstr ""
 
-msgid  "Click on the bag to take one tile."
+msgid  "Could not change your name. Please check that it's not already used by someone else!"
 msgstr ""
 
-msgid  "Put back all the tiles in the bag"
+msgid  "Can't find board '{0}'. Change board or start a new game."
 msgstr ""
 
-msgid  "Participant"
+msgid  "To join a game, please give the number which is displayed on your adversary(ies)' screen.\nIf you do not know it, ask them.\n\nWarning: your adversary must not take your number, (s)he must keep his/her own."
 msgstr ""
 
-msgid  "Rack"
+msgid  "It seems your did not give a correct number, or you clicked on “Cancel”. As a result, the current game continues, if any. To join a game, click on “Join a game” again."
 msgstr ""
 
-msgid  "Score:"
+msgid  "Double\nLetter"
 msgstr ""
 
-msgid  "Waiting for other participants…"
+msgid  "Double\nWord"
 msgstr ""
 
-msgid  "Click on someone's score\nto change it."
+msgid  "Triple\nLetter"
 msgstr ""
 
-#. The part of the sentence before and after line break should not
-#. be longer than the original message.
-#. It is okay to put line breaks anywhere to split the sentence so it is not
-#. wider than the original sentence.
-msgid  "Put back all the tiles of\nyour rack in the bag"
+msgid  "Triple\nWord"
 msgstr ""
 
-msgid  "Interface:"
+msgid  "DL"
 msgstr ""
 
-msgid  "Sorry to disturb you, but we need to reload the game so you can continue playing. You will not lose anything except the messages in the chat. Are you ready?"
+msgid  "DW"
 msgstr ""
 
-msgid  "To continue playing, click here"
+msgid  "TL"
 msgstr ""
 
-msgid  "{0}: "
+msgid  "TW"
 msgstr ""
 
-msgid  "Whoops, there is a problem. We are trying to fix it as soon as possible. Please wait a few seconds. If it persists, please contact the person who is able to fix the problem."
+msgid  "Sorry, this server doesn't support player renaming."
 msgstr ""
 
-msgid  "The problem is solved, sorry for the inconvenience!"
+msgid  "To change your name, enter a new one. You can keep using your current name by cancelling. Please note that if you change your name and you have games in progress, you will not be able to keep playing them anymore unless you get back to your current name."
 msgstr ""
 
-msgid  "It seems your browser went offline. Please reconnect to continue playing."
+msgid  "You cannot take another tile: the bag is empty."
 msgstr ""
 
-msgid  "Turn"
+msgid  "You cannot take another tile: your rack is full."
 msgstr ""
 
-msgid  "Who's turn? Click on the Turn button!"
+msgid  "Are you sure you want to put all the tiles back in the bag (in order to play another game)? This will also clear the chat history."
 msgstr ""
 
-msgid  "Click on (+) to increase someone's score."
+msgid  "Are you sure you want to change board to '{0}'? This will put all the tiles back in the bag and start another game."
 msgstr ""
 
-msgid  "Show a cell to everyone by double-clicking on it."
+msgid  "Are you sure you want to change board to {0}? This will put all the tiles back in the bag and start another game."
 msgstr ""
 
-msgid  "Show my rack to other players"
+msgid  "Are you sure you want to put all your tiles back in the bag?"
 msgstr ""
 
 msgid  "Are you sure you want to show your rack to everybody?"
 msgstr ""
 
-msgid  "jocker"
-msgstr ""
-
 msgid  "Here is my rack:"
 msgstr ""
 
-msgid  "{0} shows their rack:"
-msgstr ""
-
-msgid  "You cannot take another tile: the bag is empty."
-msgstr ""
-
-msgid  "Are you sure you want to change board to '{0}'? This will put all the tiles back in the bag and start another game."
-msgstr ""
-
-msgid  "Board:"
-msgstr ""
-
-msgid  "You changed the board to {0} for language {1}"
-msgstr ""
-
-msgid  "{0} changed the board to {1} for language {2}"
-msgstr ""
-
-msgid  "Settings"
+msgid  "joker"
 msgstr ""
 
-msgid  "Check spelling for new words"
+msgid  "No new word found"
 msgstr ""
 
 msgid  "Incorrect spelling for {0} from {1}"
@@ -190,69 +132,15 @@ msgstr ""
 msgid  "All words are correct: {0}"
 msgstr ""
 
-msgid  "No new word found"
-msgstr ""
-
-msgid  "Incorrect dictionary file."
-msgstr ""
-
-msgid  "Can't load dictionary file."
-msgstr ""
-
-msgid  "Spell checking requires Trivabble to download a dictionary. Do you confirm?"
-msgstr ""
-
-msgid  "Spell checking is based on:"
-msgstr ""
-
-msgid  "{0} points will be added to:"
-msgstr ""
-
 msgid  "There are no points to add."
 msgstr ""
 
-msgid  "Settings"
-msgstr ""
-
-msgid  "Configuration window"
+msgid  "{0} points will be added to:"
 msgstr ""
 
 msgid  "Look at:"
 msgstr ""
 
-msgid  "Double tap duration:"
-msgstr ""
-
-msgid  "(slow)"
-msgstr ""
-
-msgid  "(fast)"
-msgstr ""
-
-msgid  "Flash light duration:"
-msgstr ""
-
-msgid  "Flash light color"
-msgstr ""
-
-msgid  "Tip!"
-msgstr ""
-
-msgid  "Next tip"
-msgstr ""
-
-msgid  "Disable the spell checker"
-msgstr ""
-
-msgid  "Spell checking is not available for this language."
-msgstr ""
-
-msgid  "Score new words"
-msgstr ""
-
-msgid  "Turn:"
-msgstr ""
-
 msgid  "{0}d"
 msgstr ""
 
@@ -262,71 +150,14 @@ msgstr ""
 msgid  "{0}' {1}''"
 msgstr ""
 
-msgid  "Theme:"
-msgstr ""
-
-msgid "Auto"
-msgstr ""
-
-msgid  "Dark"
-msgstr ""
-
-msgid  "Light"
-msgstr ""
-
-msgid  "Show the timer"
-msgstr ""
-
-msgid  "To measure playing time, activate the timer."
-msgstr ""
-
-msgid  "Cell captions:"
-msgstr ""
-
-msgid  "Clip when overflow"
-msgstr ""
-
-msgid  "Dots when overflow"
-msgstr ""
-
-msgid  "No caption"
-msgstr ""
-
-msgid  "Short caption"
-msgstr ""
-
-msgid  "Configuration:"
-msgstr ""
-
-msgid  "Are you sure you want to change board to {0}? This will put all the tiles back in the bag and start another game."
-msgstr ""
-
-msgid  "Can't find board '{0}'. Change board or start a new game."
-msgstr ""
-
-msgid  "Caution, this feature is experimental; any feedback will be appreciated"
-msgstr ""
-
-msgid "Sorry, this server doesn't support player renaming."
-msgstr ""
-
-msgid "Could not change your name. Please check that it's not already used by someone else!"
-msgstr ""
-
-msgid "{0} changed their name to {1}"
-msgstr ""
-
-msgid  "joker"
-msgstr ""
-
-msgid  "Leave current game"
+msgid  "It seems your did not give your name. You need to do it for the game to run properly."
 msgstr ""
 
-msgid  "Enable first word verification"
+msgid  "Info & source code at {0}"
 msgstr ""
 
-msgid  "First word must cover center box."
+msgid  "Hello! To begin, enter your name. Your adversaries will see this name when you play with them."
 msgstr ""
 
-msgid  "Freeze tiles after playing"
+msgid  "It seems your browser went offline. Please reconnect to continue playing."
 msgstr ""
index 1daa79e12a62d5674f7e716fa06e6106fabd09fa..5abfab97d4624091fd3b5da623e742d674710c13 100644 (file)
@@ -29,10 +29,9 @@ $(addprefix $(ROOT_BOARD)/,$(EXTRA)):
 
 pot-file: $(POT_FILE)
 
-$(POT_FILE): $(sort $(wildcard $(ROOT_BOARD)/*.json))
-       awk 'BEGIN { print "#TranslationFunction trivabble" } \
-            { gsub(/[":,]/, "") } \
-            /name/ { printf "\nmsgid  \"%s\"\nmsgstr \"\"\n", $$2 }' $^ > $@
+$(POT_FILE): $(wildcard $(ROOT_BOARD)/*.json)
+       awk -F\" 'BEGIN { print "#TranslationFunction trivabble" } \
+            /name/ { printf "\nmsgid  \"%s\"\nmsgstr \"\"\n", $$4 }' $^ > $@
 
 Lettres_du_Scrabble:
        wget https://fr.wikipedia.org/wiki/Lettres_du_Scrabble
index b3d65f4d5a7962e7f1e4cae9726bac91333f3e05..427819915948fa4f950aaaf829987fa9cf65e7c6 100644 (file)
 
         if (data.boardLabel) {
             if (Object.keys(BoardList).indexOf(data.boardLabel) === -1) {
-                myAlert("Can't find board '" + data.boardLabel + "'. Change board or start a new game.");
+                myAlert(format(_("Can't find board '{0}'. Change board or start a new game."), data.boardLabel));
                 (boardLabelSelect || {}).value = "";
             } else {
                 set("boardLabel", data.boardLabel);
     }
 
     const specialTypesText = {
-        doubleLetter: "Double\nLetter",
-        doubleWord:   "Double\nWord",
-        tripleLetter: "Triple\nLetter",
-        tripleWord:   "Triple\nWord"
+        doubleLetter: _("Double\nLetter"),
+        doubleWord:   _("Double\nWord"),
+        tripleLetter: _("Triple\nLetter"),
+        tripleWord:   _("Triple\nWord")
     };
 
     const specialTypesShortText = {
-        doubleLetter: "DL",
-        doubleWord:   "DW",
-        tripleLetter: "TL",
-        tripleWord:   "TW"
+        doubleLetter: _("DL"),
+        doubleWord:   _("DW"),
+        tripleLetter: _("TL"),
+        tripleWord:   _("TW")
     };
 
     function specialCell(type, cell) {
         cell.firstChild.appendChild(document.createElement("span"));
         cell.classList.add("special-cell");
         cell.classList.add("special-cell-" + type);
-        cell.lastChild.lastChild.longText = cell.title = _(specialTypesText[type]);
-        cell.lastChild.lastChild.shortText = _(specialTypesShortText[type]);
+        cell.lastChild.lastChild.longText = cell.title = specialTypesText[type];
+        cell.lastChild.lastChild.shortText = specialTypesShortText[type];
         cell.lastChild.lastChild.className = "special-cell-label";
     }
 
         const sec = (s < 10) ? "0" + s : s;
         const min = (m < 10) ? "0" + m : m;
         const hour = (h < 10) ? "0" + h : h;
-        return ((d > 0) ? format(_("{0}d"), d) + " " : "") +
-            ((h + d > 0) ? format(_("{0}h {1}' {2}''"), (d > 0) ? hour : h, min, sec) : format(_("{0}' {1}''"), m, sec));
+        return ((d > 0) ? format(_("{0}d"), d) + " " : "") + ((h + d > 0) ?
+            format(_("{0}h {1}' {2}''"), (d > 0) ? hour : h, min, sec) :
+            format(_("{0}' {1}''"), m, sec));
     }
 
     function timerDate() {