From 42a75780d56c1dee770dbf699e4c5985cb97ec69 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sat, 15 Dec 2018 08:55:51 -0600 Subject: [PATCH] Fix style header localization --- _locales/en/messages.json | 22 +++++++++++++++++++++- js/localization.js | 2 ++ manage.html | 10 +++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f7a3a4a8..0c94c3be 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1257,12 +1257,32 @@ "shortcutsNote": { "message": "Define keyboard shortcuts" }, + "sortColumnInjection": { + "message": "injection order", + "description": "Column name seen in the tooltip when hovering over the header; used to replace the 'sortLabel` placeholder" + }, + "sortColumnEnabled": { + "message": "enabled styles", + "description": "Column name seen in the tooltip when hovering over the header; used to replace the 'sortLabel` placeholder" + }, + "sortColumnName": { + "message": "style name", + "description": "Column name seen in the tooltip when hovering over the header; used to replace the 'sortLabel` placeholder" + }, + "sortColumnVersion": { + "message": "style version", + "description": "Column name seen in the tooltip when hovering over the header; used to replace the 'sortLabel` placeholder" + }, + "sortColumnLastUpdate": { + "message": "last updated", + "description": "Column name seen in the tooltip when hovering over the header; used to replace the 'sortLabel` placeholder" + }, "sortHeader": { "message": "Sort", "description": "Title of sort column, indicating that the style can be manually sorted by dragging & dropping" }, "sortLabel": { - "message": "Click to sort by \"$name$\";\nUse shift + click to sort by multiple items", + "message": "Click to sort the \"$name$\" column;\nUse shift + click to sort multiple columns", "placeholders": { "name": { "content": "$1" diff --git a/js/localization.js b/js/localization.js index 7c40da8b..ffd725dd 100644 --- a/js/localization.js +++ b/js/localization.js @@ -9,6 +9,8 @@ tDocLoader(); function t(key, params) { if (!params && key.includes(';')) { [key, params] = key.split(';'); + // sometimes a param like "usercss" is passed; not defined in messages.json + params = params ? chrome.i18n.getMessage(params) || params : ''; } const cache = !params && t.cache[key]; const s = cache || chrome.i18n.getMessage(key, params); diff --git a/manage.html b/manage.html index 3b1f4010..bd37bb71 100644 --- a/manage.html +++ b/manage.html @@ -397,19 +397,19 @@
- # + #
- +
- +
- v# + v#
- +