Skip to content

Commit

Permalink
Rename message ids.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Sep 17, 2020
1 parent 53c23a2 commit 89c87f0
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 128 deletions.
7 changes: 2 additions & 5 deletions components/WebsiteList.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,14 @@ export default function WebsiteList({ userId }) {
<EmptyPlaceholder
msg={
<FormattedMessage
id="placeholder.message.no-websites-configured"
id="message.no-websites-configured"
defaultMessage="You don't have any websites configured."
/>
}
>
<Button icon={<Arrow />} size="medium" onClick={() => router.push('/settings')}>
<div>
<FormattedMessage
id="placeholder.message.go-to-settings"
defaultMessage="Go to settings"
/>
<FormattedMessage id="message.go-to-settings" defaultMessage="Go to settings" />
</div>
</Button>
</EmptyPlaceholder>
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Footer() {
<div />
<div>
<FormattedMessage
id="footer.powered-by"
id="message.powered-by"
defaultMessage="Powered by {name}"
values={{
name: (
Expand Down
4 changes: 2 additions & 2 deletions components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export default function Header() {
{user ? (
<>
<Link href="/dashboard">
<FormattedMessage id="header.nav.dashboard" defaultMessage="Dashboard" />
<FormattedMessage id="label.dashboard" defaultMessage="Dashboard" />
</Link>
<Link href="/settings">
<FormattedMessage id="header.nav.settings" defaultMessage="Settings" />
<FormattedMessage id="label.settings" defaultMessage="Settings" />
</Link>
<LanguageButton menuAlign="right" />
<UserButton />
Expand Down
2 changes: 1 addition & 1 deletion components/metrics/ActiveUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ActiveUsers({ websiteId, className }) {
<div className={styles.text}>
<div>
<FormattedMessage
id="active-users.message"
id="message.active-users"
defaultMessage="{x} current {x, plural, one {visitor} other {visitors}}"
values={{ x: count }}
/>
Expand Down
2 changes: 1 addition & 1 deletion components/settings/AccountSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function AccountSettings() {
<>
<PageHeader>
<div>
<FormattedMessage id="settings.accounts" defaultMessage="Accounts" />
<FormattedMessage id="label.accounts" defaultMessage="Accounts" />
</div>
<Button icon={<Plus />} size="small" onClick={() => setAddAccount(true)}>
<div>
Expand Down
2 changes: 1 addition & 1 deletion components/settings/ProfileSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function ProfileSettings() {
<>
<PageHeader>
<div>
<FormattedMessage id="settings.profile" defaultMessage="Profile" />
<FormattedMessage id="label.profile" defaultMessage="Profile" />
</div>
<Button icon={<Dots />} size="small" onClick={() => setChangePassword(true)}>
<div>
Expand Down
6 changes: 3 additions & 3 deletions components/settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ export default function Settings() {

const menuOptions = [
{
label: <FormattedMessage id="settings.websites" defaultMessage="Websites" />,
label: <FormattedMessage id="label.websites" defaultMessage="Websites" />,
value: WEBSITES,
},
{
label: <FormattedMessage id="settings.accounts" defaultMessage="Accounts" />,
label: <FormattedMessage id="label.accounts" defaultMessage="Accounts" />,
value: ACCOUNTS,
hidden: !user.is_admin,
},
{
label: <FormattedMessage id="settings.profile" defaultMessage="Profile" />,
label: <FormattedMessage id="label.profile" defaultMessage="Profile" />,
value: PROFILE,
},
];
Expand Down
8 changes: 4 additions & 4 deletions components/settings/WebsiteSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function WebsiteSettings() {
<Button
icon={<LinkIcon />}
size="small"
tooltip={<FormattedMessage id="tooltip.get-share-url" defaultMessage="Get share URL" />}
tooltip={<FormattedMessage id="message.get-share-url" defaultMessage="Get share URL" />}
tooltipId={`button-share-${row.website_id}`}
onClick={() => setShowUrl(row)}
/>
Expand All @@ -46,7 +46,7 @@ export default function WebsiteSettings() {
icon={<Code />}
size="small"
tooltip={
<FormattedMessage id="tooltip.get-tracking-code" defaultMessage="Get tracking code" />
<FormattedMessage id="message.get-tracking-code" defaultMessage="Get tracking code" />
}
tooltipId={`button-code-${row.website_id}`}
onClick={() => setShowCode(row)}
Expand Down Expand Up @@ -111,7 +111,7 @@ export default function WebsiteSettings() {
<EmptyPlaceholder
msg={
<FormattedMessage
id="placeholder.message.no-websites-configured"
id="message.no-websites-configured"
defaultMessage="You don't have any websites configured."
/>
}
Expand All @@ -128,7 +128,7 @@ export default function WebsiteSettings() {
<>
<PageHeader>
<div>
<FormattedMessage id="settings.websites" defaultMessage="Websites" />
<FormattedMessage id="label.websites" defaultMessage="Websites" />
</div>
<Button icon={<Plus />} size="small" onClick={() => setAddWebsite(true)}>
<div>
Expand Down
22 changes: 11 additions & 11 deletions lang/de-DE.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"active-users.message": "{x} {x, plural, one {aktiver Besucher} other {aktive Besucher}}",
"message.active-users": "{x} {x, plural, one {aktiver Besucher} other {aktive Besucher}}",
"button.add-account": "Konto hinzufügen",
"button.add-website": "Webseite hinzufügen",
"button.back": "Zurück",
Expand All @@ -20,9 +20,9 @@
"device.laptop": "Laptop",
"device.mobile": "Mobile",
"device.tablet": "Tablet",
"footer.powered-by": "Powered by {name}",
"header.nav.dashboard": "Übersicht",
"header.nav.settings": "Einstellungen",
"message.powered-by": "Powered by {name}",
"label.dashboard": "Übersicht",
"label.settings": "Einstellungen",
"label.administrator": "Administrator",
"label.confirm-password": "Passwort wiederholen",
"label.current-password": "Derzeitiges Passwort",
Expand Down Expand Up @@ -75,11 +75,11 @@
"metrics.unique-visitors": "Eindeutige Besucher",
"metrics.views": "Aufrufe",
"metrics.visitors": "Besucher",
"placeholder.message.go-to-settings": "Zu den Einstellungen",
"placeholder.message.no-websites-configured": "Es ist keine Webseite vorhanden.",
"settings.accounts": "Konten",
"settings.profile": "Profil",
"settings.websites": "Webseiten",
"message.go-to-settings": "Zu den Einstellungen",
"message.no-websites-configured": "Es ist keine Webseite vorhanden.",
"label.accounts": "Konten",
"label.profile": "Profil",
"label.websites": "Webseiten",
"title.add-account": "Konto hinzugfügen",
"title.add-website": "Webseite hinzufügen",
"title.change-password": "Passwort ändern",
Expand All @@ -89,6 +89,6 @@
"title.edit-website": "Webseite bearbeiten",
"title.share-url": "Freigabe-URL",
"title.tracking-code": "Tracking Kennung",
"tooltip.get-share-url": "Freigabe-URL abrufen",
"tooltip.get-tracking-code": "Erstelle Tracking Kennung"
"message.get-share-url": "Freigabe-URL abrufen",
"message.get-tracking-code": "Erstelle Tracking Kennung"
}
22 changes: 11 additions & 11 deletions lang/en-US.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"active-users.message": "{x} current {x, plural, one {visitor} other {visitors}}",
"message.active-users": "{x} current {x, plural, one {visitor} other {visitors}}",
"button.add-account": "Add account",
"button.add-website": "Add website",
"button.back": "Back",
Expand All @@ -20,9 +20,9 @@
"device.laptop": "Laptop",
"device.mobile": "Mobile",
"device.tablet": "Tablet",
"footer.powered-by": "Powered by {name}",
"header.nav.dashboard": "Dashboard",
"header.nav.settings": "Settings",
"message.powered-by": "Powered by {name}",
"label.dashboard": "Dashboard",
"label.settings": "Settings",
"label.administrator": "Administrator",
"label.confirm-password": "Confirm password",
"label.current-password": "Current password",
Expand Down Expand Up @@ -75,11 +75,11 @@
"metrics.unique-visitors": "Unique visitors",
"metrics.views": "Views",
"metrics.visitors": "Visitors",
"placeholder.message.go-to-settings": "Go to settings",
"placeholder.message.no-websites-configured": "You don't have any websites configured.",
"settings.accounts": "Accounts",
"settings.profile": "Profile",
"settings.websites": "Websites",
"message.go-to-settings": "Go to settings",
"message.no-websites-configured": "You don't have any websites configured.",
"label.accounts": "Accounts",
"label.profile": "Profile",
"label.websites": "Websites",
"title.add-account": "Add account",
"title.add-website": "Add website",
"title.change-password": "Change password",
Expand All @@ -89,6 +89,6 @@
"title.edit-website": "Edit website",
"title.share-url": "Share URL",
"title.tracking-code": "Tracking code",
"tooltip.get-share-url": "Get share URL",
"tooltip.get-tracking-code": "Get tracking code"
"message.get-share-url": "Get share URL",
"message.get-tracking-code": "Get tracking code"
}
22 changes: 11 additions & 11 deletions lang/es-MX.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"active-users.message": "{x} {x, plural, one {activo} other {activos}}",
"message.active-users": "{x} {x, plural, one {activo} other {activos}}",
"button.add-account": "Agregar usuario",
"button.add-website": "Agregar sitio",
"button.back": "Atrás",
Expand All @@ -20,9 +20,9 @@
"device.laptop": "Laptop",
"device.mobile": "Mobile",
"device.tablet": "Tablet",
"footer.powered-by": "Desarrollado con {name}",
"header.nav.dashboard": "Panel de control",
"header.nav.settings": "Configuraciones",
"message.powered-by": "Desarrollado con {name}",
"label.dashboard": "Panel de control",
"label.settings": "Configuraciones",
"label.administrator": "Administrador",
"label.confirm-password": "Confirmar contraseña",
"label.current-password": "Contraseña actual",
Expand Down Expand Up @@ -75,11 +75,11 @@
"metrics.unique-visitors": "Visitantes únicos",
"metrics.views": "Vistas",
"metrics.visitors": "Visitantes",
"placeholder.message.go-to-settings": "Ir a la configuración",
"placeholder.message.no-websites-configured": "No tienes ningún sitio configurado.",
"settings.accounts": "Usuarios",
"settings.profile": "Perfil",
"settings.websites": "Sitios",
"message.go-to-settings": "Ir a la configuración",
"message.no-websites-configured": "No tienes ningún sitio configurado.",
"label.accounts": "Usuarios",
"label.profile": "Perfil",
"label.websites": "Sitios",
"title.add-account": "Agregar usuario",
"title.add-website": "Agregar sitio",
"title.change-password": "Cambiar contraseña",
Expand All @@ -89,6 +89,6 @@
"title.edit-website": "Editar sitio",
"title.share-url": "Compartir URL",
"title.tracking-code": "Código de rastreo",
"tooltip.get-share-url": "Obtener URL para compartir",
"tooltip.get-tracking-code": "Obtener código de rastreo"
"message.get-share-url": "Obtener URL para compartir",
"message.get-tracking-code": "Obtener código de rastreo"
}
22 changes: 11 additions & 11 deletions lang/fr-FR.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"active-users.message": "{x} {x, plural, one {visiteur} other {visiteurs}} actuellement",
"message.active-users": "{x} {x, plural, one {visiteur} other {visiteurs}} actuellement",
"button.add-account": "Ajouter un compte",
"button.add-website": "Ajouter un site",
"button.back": "Retour",
Expand All @@ -20,9 +20,9 @@
"device.laptop": "Laptop",
"device.mobile": "Mobile",
"device.tablet": "Tablet",
"footer.powered-by": "Propulsé par {name}",
"header.nav.dashboard": "Tableau de bord",
"header.nav.settings": "Paramètres",
"message.powered-by": "Propulsé par {name}",
"label.dashboard": "Tableau de bord",
"label.settings": "Paramètres",
"label.administrator": "Administrateur",
"label.confirm-password": "Confirmation du mot de passe",
"label.current-password": "Mot de passe actuel",
Expand Down Expand Up @@ -75,11 +75,11 @@
"metrics.unique-visitors": "Visiteurs uniques",
"metrics.views": "Vues",
"metrics.visitors": "Visiteurs",
"placeholder.message.go-to-settings": "Aller aux paramètres",
"placeholder.message.no-websites-configured": "Vous n'avez configuré aucun site Web.",
"settings.accounts": "Comptes",
"settings.profile": "Profile",
"settings.websites": "Sites",
"message.go-to-settings": "Aller aux paramètres",
"message.no-websites-configured": "Vous n'avez configuré aucun site Web.",
"label.accounts": "Comptes",
"label.profile": "Profile",
"label.websites": "Sites",
"title.add-account": "Ajouter un compte",
"title.add-website": "Ajouter un site",
"title.change-password": "Changer le mot de passe",
Expand All @@ -89,6 +89,6 @@
"title.edit-website": "Modifier le site",
"title.share-url": "Partager l'URL",
"title.tracking-code": "Code de suivi",
"tooltip.get-share-url": "Obtenez l'URL de partage",
"tooltip.get-tracking-code": "Obtenez le code de suivi"
"message.get-share-url": "Obtenez l'URL de partage",
"message.get-tracking-code": "Obtenez le code de suivi"
}
22 changes: 11 additions & 11 deletions lang/ja-JP.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"active-users.message": "{x}人が閲覧中です。",
"message.active-users": "{x}人が閲覧中です。",
"button.add-account": "アカウントを追加する",
"button.add-website": "Webサイトを追加する",
"button.back": "戻る",
Expand All @@ -20,9 +20,9 @@
"device.laptop": "Laptop",
"device.mobile": "Mobile",
"device.tablet": "Tablet",
"footer.powered-by": "Powered by {name}",
"header.nav.dashboard": "ダッシュボード",
"header.nav.settings": "設定",
"message.powered-by": "Powered by {name}",
"label.dashboard": "ダッシュボード",
"label.settings": "設定",
"label.administrator": "管理者",
"label.confirm-password": "パスワード(確認)",
"label.current-password": "現在のパスワード",
Expand Down Expand Up @@ -75,11 +75,11 @@
"metrics.unique-visitors": "ユニーク訪問者数",
"metrics.views": "閲覧数",
"metrics.visitors": "訪問者数",
"placeholder.message.go-to-settings": "設定する",
"placeholder.message.no-websites-configured": "Webサイトが設定されていません。",
"settings.accounts": "アカウント",
"settings.profile": "プロファイル",
"settings.websites": "Webサイト",
"message.go-to-settings": "設定する",
"message.no-websites-configured": "Webサイトが設定されていません。",
"label.accounts": "アカウント",
"label.profile": "プロファイル",
"label.websites": "Webサイト",
"title.add-account": "アカウントの追加",
"title.add-website": "Webサイトの追加",
"title.change-password": "パスワード変更",
Expand All @@ -89,6 +89,6 @@
"title.edit-website": "Webサイトの編集",
"title.share-url": "共有リンク",
"title.tracking-code": "トラッキングコード",
"tooltip.get-share-url": "共有リンクを取得",
"tooltip.get-tracking-code": "トラッキングコードを取得"
"message.get-share-url": "共有リンクを取得",
"message.get-tracking-code": "トラッキングコードを取得"
}
Loading

0 comments on commit 89c87f0

Please sign in to comment.