From ec299053ba080a81b4bbf09e2ec8d9de7a55d035 Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Sun, 18 Nov 2018 21:34:28 +0100 Subject: [PATCH] Updates in locale --- locales/en/common.json | 16 +++++++++++----- locales/extract.js | 2 +- shared/langs.js | 12 ++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/locales/en/common.json b/locales/en/common.json index dae88417..bd2f33f4 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -119,6 +119,7 @@ "editRssCampaign": "Edit RSS Campaign", "editTriggeredCampaign": "Edit Triggered Campaign", "template": "Template", + "template_plural": "Templates", "customContentClonedFromTemplate": "Custom content cloned from template", "customContentClonedFromAnotherCampaign": "Custom content cloned from another campaign", "customContent": "Custom content", @@ -140,11 +141,13 @@ "subscribers": "Subscribers", "description": "Description", "namespace": "Namespace", + "namespace_plural": "Namespaces", "remove": "Remove", "insertNewEntryBeforeThisOne": "Insert new entry before this one", "moveUp": "Move up", "moveDown": "Move down", "list": "List", + "list_plural": "Lists", "segment": "Segment", "useAParticularSegment": "Use a particular segment", "lists": "Lists", @@ -160,6 +163,7 @@ "contentSource": "Content source", "selectingATemplateCreatesACampaign": "Selecting a template creates a campaign specific copy from it.", "campaign": "Campaign", + "campaign_plural": "Campaigns", "contentOfTheSelectedCampaignWillBeCopied": "Content of the selected campaign will be copied into this campaign.", "renderUrl": "Render URL", "ifAMessageIsSentThenThisUrlWillBePosTed": "If a message is sent then this URL will be POSTed to using Merge Tags as POST body. Use this if you want to generate the HTML message yourself.", @@ -171,6 +175,7 @@ "formCannotBeEditedBecauseTheCampaignIs": "Form cannot be edited because the campaign is currently being sent out. Wait till the sending is finished and refresh.", "thisIsTheCampaignIdDisplayedToThe": "This is the campaign ID displayed to the subscribers", "sendConfiguration": "Send configuration", + "sendConfiguration_plural": "Send configurations", "customUnsubscribeUrl": "Custom unsubscribe URL", "disableOpenedTracking": "Disable opened tracking", "disableClickedTracking": "Disable clicked tracking", @@ -296,12 +301,7 @@ "someoneElseHasIntroducedModificationIn": "Someone else has introduced modification in the meantime. Refresh your page to start anew with fresh data. Please note that your changes will be lost.", "itSeemsThatSomeoneElseHasDeletedThe": "It seems that someone else has deleted the target namespace in the meantime. Refresh your page to start anew with fresh data. Please note that your changes will be lost.", "itSeemsThatSomeoneElseHasDeletedThe-1": "It seems that someone else has deleted the entity in the meantime.", - "namespace_plural": "Namespaces", - "list_plural": "Lists", "customForms": "Custom forms", - "campaign_plural": "Campaigns", - "template_plural": "Templates", - "sendConfiguration_plural": "Send configurations", "report": "Report", "report_plural": "Reports", "reportTemplate": "Report template", @@ -860,6 +860,12 @@ "foundAddedMessagesNewCampaignMessages": "Found {{addedMessages}} new campaign messages from feed {{campaignId}}", "foundNothingNewFromTheFeed": "Found nothing new from the feed", "missingEmail": "Missing email", + "en": "EN", + "english": "English", + "es": "ES", + "spanish": "Spanish", + "fake": "FAKE", + "fake-1": "Fake", "thePasswordMustBeAtLeastMinLength": "The password must be at least {{ minLength }} characters long", "thePasswordMustBeFewerThanMaxLength": "The password must be fewer than {{ maxLength }} characters", "thePasswordMayNotContainSequencesOfThree": "The password may not contain sequences of three or more repeated characters", diff --git a/locales/extract.js b/locales/extract.js index 044cbc4f..3a5479bf 100644 --- a/locales/extract.js +++ b/locales/extract.js @@ -14,7 +14,7 @@ const camelCase = require('camelcase'); const slugify = require('slugify'); const readline = require('readline'); -const localeFile = 'common/en.json'; +const localeFile = 'en/common.json'; const searchDirs = [ '../client/src', '../server', diff --git a/shared/langs.js b/shared/langs.js index 73fd36a5..efbef37b 100644 --- a/shared/langs.js +++ b/shared/langs.js @@ -41,20 +41,20 @@ function convertToFake(dict) { const langCodes = { en_US: { - getShortLabel: t => t('EN'), - getLabel: t => t('English'), + getShortLabel: t => t('en'), + getLabel: t => t('english'), shortCode: 'en', longCode: 'en_US' }, es: { - getShortLabel: t => t('ES'), - getLabel: t => t('Spanish'), + getShortLabel: t => t('es'), + getLabel: t => t('spanish'), shortCode: 'es', longCode: 'es' }, fake: { - getShortLabel: t => t('FAKE'), - getLabel: t => t('Fake'), + getShortLabel: t => t('fake'), + getLabel: t => t('fake-1'), shortCode: 'fake', longCode: 'fake' }