Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localisation #208

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/components/editor/ButtonCatalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
searchResults: !!searchState
}">

<h3 id="ButtonCatalogHeader">Button Catalog</h3>
<h3 id="ButtonCatalogHeader">{{ $t('ButtonCatalog.heading') }}</h3>
<div id="CatalogDescription">
<span v-if="isLite">Click on a button name to configure and add to MorphicBar</span>
<span v-else>Click or Drag name (below) to add button to the bar</span>
<span v-if="isLite">{{ $t('ButtonCatalog.description-lite') }}</span>
<span v-else>{{ $t('ButtonCatalog.description') }}</span>
</div>

<!-- search -->
<b-input-group id="search-group" class="catalogSearch" size="sm">
<b-form-input type="search" placeholder="Search buttons" v-model="searchText" aria-label="Search the button catalog"/>
<b-form-input type="search" placeholder="Search buttons" v-model="searchText" :aria-label="$t('ButtonCatalog.search_label')"/>
<b-input-group-append>
<b-button variant="outline-secondary" aria-label="Search" @click="searchButtonClick">
<b-icon-search/>
Expand All @@ -36,7 +36,7 @@
:class="{ searchResults: isSearchResult}">

<li v-if="isSearchResult && searchResult && searchResult.itemsFound.hidden">
<small>No buttons where found while searching for '<code>{{searchText}}</code>'</small>
<small>{{ $t('ButtonCatalog.no-results', {searchText}) }}</small>
</li>
<template v-for="(buttonGroup, subkind) in catalog">
<li v-if="!buttonGroup.hidden"
Expand All @@ -52,7 +52,7 @@
<h4 v-if="buttonGroup.title">{{buttonGroup.title}}</h4>

<ul class="buttonCatalogEntries"
:aria-label="buttonGroup.isSearchResult && 'Search results'">
:aria-label="buttonGroup.isSearchResult && $t('ButtonCatalog.search-results')">
<template v-for="(button, buttonId) in buttonGroup.items">
<li v-if="!(button.data.isExpander && alwaysShowSecondaryItems)"
:key="button.data.buttonKey"
Expand Down
49 changes: 27 additions & 22 deletions src/components/editor/DesktopBarEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="bar-label">
<strong class="bar-name" aria-label="Bar name">{{barDetails.name}}</strong>
<span v-if="memberDetails" class="bar-owner" aria-label="Bar owner">{{memberDetails.displayName}}</span>
<small class="bar-tip">Tip: To customize a button on the bar, click on it.</small>
<small class="bar-tip" v-t="'DesktopBarEditor.customize-tip'" />
</div>
</div>

Expand All @@ -22,9 +22,7 @@
endpoint: {type: 'arrowHead'}
}"/>
<span class="arrowTo" />
<p>This is an empty MorphicBar.</p>
Click or drag a button from the Button Catalog (on the right) to add it to the bar.
</div>
<p v-t="'DesktopBarEditor.empty-hint_lead'" />{{ $t('DesktopBarEditor.empty-hint_text') }}</div>

<!-- Bar item problems -->
<div class="desktop-alerts">
Expand All @@ -46,28 +44,35 @@
<!-- Duplicated labels -->
<template
v-if="error.type === 'duplicate' && error.item.configuration.label === error.duplicates[0].configuration.label">
<BarItemLink :bar-item="error.item"
@click="showEditDialog(error.item)"
@mouseover="highlight(false, error.item)"
@mouseleave="highlight(true, error.item)"
/>
is duplicated.
<i18n path="DesktopBarEditor.bar-error.duplicated">
<template #item>
<BarItemLink :bar-item="error.item"
@click="showEditDialog(error.item)"
@mouseover="highlight(false, error.item)"
@mouseleave="highlight(true, error.item)"
/>
</template>
</i18n>
</template>

<!-- Duplicated actions -->
<template v-else-if="error.type === 'duplicate'">
<BarItemLink :bar-item="error.item"
@click="showEditDialog(error.item)"
@mouseover="highlight(false, error.item)"
@mouseleave="highlight(true, error.item)"
/>

performs the same action as
<BarItemLink :bar-item="error.duplicates[0]"
@click="showEditDialog(error.duplicates[0])"
@mouseenter="highlight(false, error.duplicates)"
@mouseleave="highlight(true, error.duplicates)"
/>
<i18n path="DesktopBarEditor.bar-error.duplicate-action">
<template #item1>
<BarItemLink :bar-item="error.item"
@click="showEditDialog(error.item)"
@mouseover="highlight(false, error.item)"
@mouseleave="highlight(true, error.item)"
/>
</template>
<template #item2>
<BarItemLink :bar-item="error.duplicates[0]"
@click="showEditDialog(error.duplicates[0])"
@mouseenter="highlight(false, error.duplicates)"
@mouseleave="highlight(true, error.duplicates)"
/>
</template>
</i18n>
</template>

<!-- Generic problem -->
Expand Down
18 changes: 8 additions & 10 deletions src/components/editor/EditorDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
fluid="1">

<TextInputDialog id="barNameDialog"
title="Rename Bar"
prompt="Enter the new name for the bar"
:title="$t('EditorDetails.rename-dialog_title')"
:prompt="$t('EditorDetails.rename-dialog_prompt')"
v-model="barDetails.name"
@ok="renameBar"
/>
Expand All @@ -28,24 +28,22 @@
<div id="BarDetails" :class="isLite && 'bg-silver rounded p-2'">
<!-- Bar name -->
<div class="bar-name">
<h2>Bar: <span class="name">{{barName}}</span></h2>
<h2>{{ $t('EditorDetails.bar_heading') }}: <span class="name">{{barName}}</span></h2>
<!-- rename bar -->
<span v-if="barDetails.name !== 'Default'" class="actions">
<b-button variant="link" @click="showRenameBarDialog()">rename</b-button>
<b-button variant="link" @click="deleteBar()" class="text-danger">delete</b-button>
<b-button variant="link" @click="showRenameBarDialog()" v-t="'EditorDetails.rename-bar_button'" />
<b-button variant="link" @click="deleteBar()" class="text-danger" v-t="'EditorDetails.delete-bar_button'" />
</span>

</div>
<div class="mb-1">
<span class="lead">
<template v-if="barMembers.length === 0">
Shared bar
</template>
<template v-if="barMembers.length === 0">{{ $t('EditorDetails.shared-bar') }}</template>
<template v-else-if="barMembers.length === 1">
Person: <span class="name">{{ barMembers[0].displayName }}</span>
{{ $t('EditorDetails.person') }}: <span class="name">{{ barMembers[0].displayName }}</span>
</template>
<template v-else>
Person: <span class="name">{{ barMembers.length }} members</span>
{{ $t('EditorDetails.person') }}: <span class="name">{{ $t('EditorDetails.bar-members', {memberCount: barMembers.length}) }}</span>
</template>
</span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/editor/LiteBarEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<div class="editorHeader">
<div/>
<div class="editorTitle">
<h3>Buttons on the Bar</h3>
Tip: To customize a button on the bar, click on it.
<h3 v-t="'LiteBarEditor.bar_header'" />
{{ $t('LiteBarEditor.customize-tip') }}
</div>
<div><b-button variant="secondary" @click="showCatalog()">Add a button</b-button></div>
<div><b-button variant="secondary" @click="showCatalog()" v-t="'LiteBarEditor.add-button_button'" /></div>
</div>

<div class="bar">
Expand Down
173 changes: 172 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,74 @@
{
"AccountSettings": {
"account": {
"basic_lead": "You have a free account with basic Morphic features",
"basic_list-label": "With the free basic features of Morphic, you can...",
"basic_list": [
"Apply your usability and accessibility settings on computers with Morphic installed",
"Use the Basic MorphicBar and any MorphicBars that you have been invited to use"
],
"billing_button": "Manage subscription and billing",
"number-of-people": "{member_count} (out of {member_limit} maximum allowed on this subscription)",
"number-of-people_label": "Number of people you have added:",
"rename-dialog_title": "Rename Account",
"rename-dialog_prompt": "Enter the new name for the account",
"rename_button": "Change account name",
"signup_button": "Sign up for a Morphic Plus subscription",
"subscription-type": "Subscription type: {plan_name}",
"title": "My Morphic account",
"update-list_items": [
"Create MorphicBars for yourself",
"Create and manage MorphicBars for other people"
],
"upgrade-list": "With a Morphic Plus subscription, you can...",
"upgrade_lead": "Upgrade to Morphic Plus"
},
"back_link": "Back to Custom MorphicBar Tool",
"bars": {
"lead": "Listed below are the MorphicBars you have accepted from others and that are managed by them on your behalf.",
"lead_remove": "If you \"remove\" their bar(s), then you will no longer have access to the bar(s) that they manage for you.",
"list-item": "<b>{name}</b> has provided the following bar(s) for you:",
"title": "MorphicBars I have accepted"
},
"sign-in": {
"change-password_button": "Change password",
"email+password": "Email & Password",
"email-confirmed": "(confirmed)",
"email-not-confirmed": "This email address is not confirmed. You will need to click a link sent you you by Morphic to confirm.\n Check your junk or spam folder or re-send the confirmation email.",
"lead": "You have currently set up the following ways to sign into your Morphic account",
"resend-confirmation_button": "Re-send confirmation email",
"title": "My sign-in method"
}
},
"BarSettings": {
"delete_button": "Delete Bar",
"rename_button": "Edit bar name"
},
"ButtonCatalog": {
"search-result-summary": "No items found | 1 item found | {n} items found"
"catalog-groups": {
"make": "Make a button",
"call": "Call a Person",
"meeting": "Meeting Room",
"action": "Action Buttons",
"local-calendar": "Calendar - App on Computer",
"calendar": "Calendar - Website",
"socialMedia": "Social Media Sites",
"local-email": "Email - App on Computer",
"email": "Email - Websites",
"photo": "Photo Sharing",
"news": "News",
"shopping": "Shopping",
"multimedia": "Media",
"onlineFileDrives": "Online Drives",
"app": "Local Apps"
},
"description": "Click or Drag name (below) to add button to the bar",
"description-lite": "Click on a button name to configure and add to MorphicBar",
"heading": "Button Catalog",
"no-results": "No buttons where found while searching for '<code>{searchText}</code>'",
"search-result-summary": "No items found | 1 item found | {n} items found",
"search-results": "Search results",
"search_label": "Search the button catalog"
},
"ConfirmEmail": {
"dialog_title": "Confirm your email",
Expand All @@ -24,10 +88,28 @@
"select-instruction": "Select a bar to copy from:",
"title": "Copy bar"
},
"DesktopBarEditor": {
"customize-tip": "Tip: To customize a button on the bar, click on it.",
"empty-hint_lead": "This is an empty MorphicBar.",
"empty-hint_text": "Click or drag a button from the Button Catalog (on the right) to add it to the bar.",
"bar-error": {
"duplicated": "{item} is duplicated",
"duplicate-action": "{item1} performs the same action as {item2}",
"error": "{item1} performs the same action as {item2}"
}
},
"EditorDetails": {
"bar-members": "{memberCount} members",
"bar_heading": "Bar",
"copy-bar_button": "Copy bar from...",
"delete-bar_button": "delete",
"person": "Person",
"rename-dialog_prompt": "Enter the new name for the bar",
"rename-dialog_title": "Rename Bar",
"rename-bar_button": "rename",
"revert-bar_button": "Revert to user's current bar",
"save-bar_button": "Save bar",
"shared-bar": "Shared bar",
"try-it_button": "Try it"
},
"General": {
Expand Down Expand Up @@ -77,6 +159,60 @@
"new-bar_button_aria-label": "Add a new bar for {name}"
},
"BillingDetails": {
"CouponDialog": {
"apply_button": "Apply coupon",
"clear_button": "clear coupon",
"coupon-applied": "Coupon applied",
"coupon-not-applied": "You've entered a coupon, but have not applied it.",
"coupon-not-applied_title": "Coupon not applied",
"coupon_label": "Coupon Code",
"payment_radio": {
"free": "{price_text}",
"month": "{price_text} per month monthly subscription",
"year": "{price_text} per year yearly subscription"
},
"radio_description": {
"free": "Free",
"month": "Renews automatically every month until cancelled",
"year": "Renews automatically every year until cancelled"
},
"skip_button": "Skip"
},
"add-card_button": "Add Card",
"add-more": "If you want to add more people, change your subscription below.",
"back_link": "Back to Morphic Account Settings",
"basic-features": "(Basic features only)",
"basic-features_button": "Basic features only",
"basic-morphic-bar": "Use the Basic MorphicBar (no custom MorphicBars)",
"change-card_button": "Change Card",
"change-subscription_header": "Change your Morphic Subscription",
"coupon-error": {
"unknown": "Not a valid coupon",
"expired": "Coupon expired",
"inactive": "Coupon is no longer valid",
"invalid_email": "Coupon is not valid for your email address",
"wrong_plan": "Coupon is not valid for this plan"
},
"coupon-used": "Coupon used:",
"current-subscription_title": "Current subscription for {name}",
"custom-morphic-bars": "Make and use custom MorphicBars for yourself",
"free": "Free!",
"free-forever": "Free forever",
"free-months": "Free for {duration_months} months",
"free-year": "Free for one year",
"morphic": "Morphic",
"morphic-bars-for-others": "Make up to 5 MorphicBars each for up to {member_limit} other people",
"morphic-plus": "Morphic Plus",
"morphic-plus-number_button": "Morphic Plus {member_limit}",
"no-payment-method": "No credit card on file",
"number-of-people": "Number of people you have added:",
"number-of-people_value": "{member_count} (out of {member_limit} maximum allowed on this subscription)",
"or": "or",
"payment-monthly": "{monthly_price_text} per month ({annual_price_text} over 12 months)",
"payment-time": "| {price_text} per month | {price_text} every {n} months",
"payment-yearly": "{price_text} (12 month) subscription",
"subscription-type": "Subscription type: {name}",
"transfer-settings": "Transfer your AT settings to any computer with Morphic on it"
},
"BlockLoginRegister": {
},
Expand Down Expand Up @@ -106,12 +242,40 @@
"sign-in-register_link": "Sign up for a new Morphic account with a different email",
"sign-in_button": "Sign in"
},
"LiteBarEditor": {
"bar_header": "Buttons on the Bar",
"customize-tip": "Tip: To customize a button on the bar, click on it.",
"add-button_button": "Add a button"
},
"MemberDetails": {
"bar-unused": "This bar has no members using it.",
"delete-member_button": "Delete member",
"re-invite_button": "Send a new invitation",
"invite_button": "Send an invitation"
},
"MorhpicBarEditor": {
"saved-dialog": {
"details": "It will show up automatically on the computer soon. Users may need to open Morphic and switch to this MorphicBar to see it.",
"lead": "This MorphicBar has been saved.",
"title": "MorphicBar Saved"
},
"saved-uninvited-dialog": {
"invite-later_button": "Invite later",
"invite_button": "Invite now",
"p1": "This MorphicBar has been saved.",
"p2": "Now that the bar has been saved, it is ready for the person to start using it.",
"p3": "If you are ready for the person to use it, you can invite the following person to download, install, and sign\n into Morphic, which will get this bar on the person's computer:",
"title": "MorphicBar Saved"
},
"unsaved-dialog": {
"cancel_button": "@:(General.cancel_button)",
"continue_button": "Continue, without saving",
"p1": "You have made some changes to this bar, but they are not saved yet.",
"p2": "If you leave now, the recent modifications will be lost.",
"save_button": "Save",
"title": "Unsaved Changes"
}
},
"NewMember": {
"title": "Add a person"
},
Expand Down Expand Up @@ -256,6 +420,8 @@
"settings_tooltip": "Settings for {name}"
},
"MorphicBarEditor": {
"back_link": "Switch Bar or Person",
"confirm-revert": "Are you sure you want reload last saved version of the bar? This means you will lose all unsaved changes!"
},
"MorphicBarPreconfigured": {
},
Expand Down Expand Up @@ -396,6 +562,11 @@
},
"ValidatedInput": {
},
"billing": {
"special-coupon_button": "Get coupon for free year",
"special-coupon_notice": "Option available today for a free year!",
"special-coupon_text": "Thanks to a generous donor, you can get one year of Morphic Plus 5 for free for a limited time."
},
"members": {
"changeRole": {
"apply_button": "Change to {role}",
Expand Down
Loading