diff --git a/src/i18n/be_BY.json b/src/i18n/be-BY.json similarity index 100% rename from src/i18n/be_BY.json rename to src/i18n/be-BY.json diff --git a/src/i18n/de_AT.json b/src/i18n/de-AT.json similarity index 100% rename from src/i18n/de_AT.json rename to src/i18n/de-AT.json diff --git a/src/i18n/de_IN.json b/src/i18n/de-IN.json similarity index 100% rename from src/i18n/de_IN.json rename to src/i18n/de-IN.json diff --git a/src/i18n/ms_MY.json b/src/i18n/ms-MY.json similarity index 100% rename from src/i18n/ms_MY.json rename to src/i18n/ms-MY.json diff --git a/src/i18n/pt_BR.json b/src/i18n/pt-BR.json similarity index 100% rename from src/i18n/pt_BR.json rename to src/i18n/pt-BR.json diff --git a/src/i18n/pt.json b/src/i18n/pt.json index 8e4066ea4..77bcb8c57 100644 --- a/src/i18n/pt.json +++ b/src/i18n/pt.json @@ -13,8 +13,8 @@ "choose_a_department_1": "Choose a department", "choose_an_option": "Choose an option...", "conversation_finished": "Chat encerrado", - "count_new_messages_since_since_one": "One new message since {{since}}", - "count_new_messages_since_since_other": "{{count}} new messages since {{since}}", + "count_new_messages_since_since_one": "Uma nova mensagem desde {{since}}", + "count_new_messages_since_since_other": "{{count}} novas mensagens desde {{since}}", "department_switched": "Departamento comutado", "departments": "Departments", "disable_notifications": "Disable notifications", diff --git a/src/i18n/sk_SK.json b/src/i18n/sk-SK.json similarity index 100% rename from src/i18n/sk_SK.json rename to src/i18n/sk-SK.json diff --git a/src/i18n/sl_SI.json b/src/i18n/sl-SI.json similarity index 100% rename from src/i18n/sl_SI.json rename to src/i18n/sl-SI.json diff --git a/src/i18n/ta_IN.json b/src/i18n/ta-IN.json similarity index 100% rename from src/i18n/ta_IN.json rename to src/i18n/ta-IN.json diff --git a/src/i18n/th_TH.json b/src/i18n/th-TH.json similarity index 100% rename from src/i18n/th_TH.json rename to src/i18n/th-TH.json diff --git a/src/i18n/vi_VN.json b/src/i18n/vi-VN.json similarity index 100% rename from src/i18n/vi_VN.json rename to src/i18n/vi-VN.json diff --git a/src/i18n/zh_HK.json b/src/i18n/zh-HK.json similarity index 100% rename from src/i18n/zh_HK.json rename to src/i18n/zh-HK.json diff --git a/src/i18n/zh_TW.json b/src/i18n/zh-TW.json similarity index 100% rename from src/i18n/zh_TW.json rename to src/i18n/zh-TW.json diff --git a/src/lib/locale.js b/src/lib/locale.js index 424e03e8b..c0b3c8766 100644 --- a/src/lib/locale.js +++ b/src/lib/locale.js @@ -17,7 +17,7 @@ export const normalizeLanguageString = (languageString) => { countryCode = countryCode.toUpperCase(); } - return countryCode ? `${ languageCode }_${ countryCode }` : languageCode; + return countryCode ? `${ languageCode }-${ countryCode }` : languageCode; }; /** diff --git a/src/lib/main.js b/src/lib/main.js index f2b2242be..f395736bf 100644 --- a/src/lib/main.js +++ b/src/lib/main.js @@ -40,6 +40,7 @@ export const loadConfig = async () => { export const processUnread = async () => { const { minimized, visible, messages } = store.state; + if (minimized || !visible) { const { alerts, lastReadMessageId } = store.state; const renderedMessages = messages.filter((message) => canRenderMessage(message)); @@ -48,7 +49,7 @@ export const processUnread = async () => { if (lastReadMessageIndex !== -1) { const lastReadMessage = renderedMessages[lastReadMessageIndex]; - const alertMessage = i18next.t('count_new_messages_since_since', { count: unreadMessages, since: format(parseISO(lastReadMessage.ts), 'HH:mm MMM dd') }); + const alertMessage = i18next.t('count_new_messages_since_since', { count: unreadMessages.length, since: format(parseISO(lastReadMessage.ts), 'HH:mm MMM dd') }); const alert = { id: constants.unreadMessagesAlertId, children: alertMessage, success: true, timeout: 0 }; const newAlerts = alerts.filter((item) => item.id !== constants.unreadMessagesAlertId); await store.setState({ alerts: (newAlerts.push(alert), newAlerts) });