From be0a01145b5f303c5c506858146ccf6c6d5cee72 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Thu, 27 Apr 2017 19:03:28 +0900 Subject: [PATCH] Sync a locale files for JavaScript (#2513) There are multiple messages missing in en.jsx. It is very troublesome when translating other languages. --- .../components/components/account.jsx | 4 +- .../components/components/status.jsx | 2 +- .../components/status_action_bar.jsx | 4 +- .../containers/spoiler_button_container.jsx | 2 +- .../compose/containers/warning_container.jsx | 2 +- .../features/status/components/action_bar.jsx | 4 +- .../ui/components/onboarding_modal.jsx | 2 +- .../javascripts/components/locales/en.jsx | 59 ++++++++++++++----- 8 files changed, 55 insertions(+), 24 deletions(-) diff --git a/app/assets/javascripts/components/components/account.jsx b/app/assets/javascripts/components/components/account.jsx index 57c631d29..81439bd25 100644 --- a/app/assets/javascripts/components/components/account.jsx +++ b/app/assets/javascripts/components/components/account.jsx @@ -10,8 +10,8 @@ const messages = defineMessages({ follow: { id: 'account.follow', defaultMessage: 'Follow' }, unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' }, requested: { id: 'account.requested', defaultMessage: 'Awaiting approval' }, - unblock: { id: 'account.unblock', defaultMessage: 'Unblock' }, - unmute: { id: 'account.unmute', defaultMessage: 'Unmute' } + unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' }, + unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' } }); class Account extends React.PureComponent { diff --git a/app/assets/javascripts/components/components/status.jsx b/app/assets/javascripts/components/components/status.jsx index 823c7b537..193231837 100644 --- a/app/assets/javascripts/components/components/status.jsx +++ b/app/assets/javascripts/components/components/status.jsx @@ -53,7 +53,7 @@ class Status extends React.PureComponent {
- }} /> + }} />
diff --git a/app/assets/javascripts/components/components/status_action_bar.jsx b/app/assets/javascripts/components/components/status_action_bar.jsx index 044b3f964..29938f23e 100644 --- a/app/assets/javascripts/components/components/status_action_bar.jsx +++ b/app/assets/javascripts/components/components/status_action_bar.jsx @@ -11,8 +11,8 @@ const messages = defineMessages({ block: { id: 'account.block', defaultMessage: 'Block @{name}' }, reply: { id: 'status.reply', defaultMessage: 'Reply' }, replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' }, - reblog: { id: 'status.reblog', defaultMessage: 'Reblog' }, - cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be reblogged' }, + reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, + cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, open: { id: 'status.open', defaultMessage: 'Expand this status' }, report: { id: 'status.report', defaultMessage: 'Report @{name}' } diff --git a/app/assets/javascripts/components/features/compose/containers/spoiler_button_container.jsx b/app/assets/javascripts/components/features/compose/containers/spoiler_button_container.jsx index c54904b60..b1c80fe19 100644 --- a/app/assets/javascripts/components/features/compose/containers/spoiler_button_container.jsx +++ b/app/assets/javascripts/components/features/compose/containers/spoiler_button_container.jsx @@ -4,7 +4,7 @@ import { changeComposeSpoilerness } from '../../../actions/compose'; import { injectIntl, defineMessages } from 'react-intl'; const messages = defineMessages({ - title: { id: 'compose_form.spoiler', defaultMessage: 'Hide text behind content warning' } + title: { id: 'compose_form.spoiler', defaultMessage: 'Hide text behind warning' } }); const mapStateToProps = (state, { intl }) => ({ diff --git a/app/assets/javascripts/components/features/compose/containers/warning_container.jsx b/app/assets/javascripts/components/features/compose/containers/warning_container.jsx index 62a9bb571..cd744ed82 100644 --- a/app/assets/javascripts/components/features/compose/containers/warning_container.jsx +++ b/app/assets/javascripts/components/features/compose/containers/warning_container.jsx @@ -29,7 +29,7 @@ const WarningWrapper = ({ needsLeakWarning, needsLockWarning, mentionedDomains } {mentionedDomains.join(', ')}, domainsCount: mentionedDomains.length }} />} /> diff --git a/app/assets/javascripts/components/features/status/components/action_bar.jsx b/app/assets/javascripts/components/features/status/components/action_bar.jsx index 764d6646e..1e0b3f74d 100644 --- a/app/assets/javascripts/components/features/status/components/action_bar.jsx +++ b/app/assets/javascripts/components/features/status/components/action_bar.jsx @@ -8,8 +8,8 @@ const messages = defineMessages({ delete: { id: 'status.delete', defaultMessage: 'Delete' }, mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' }, reply: { id: 'status.reply', defaultMessage: 'Reply' }, - reblog: { id: 'status.reblog', defaultMessage: 'Reblog' }, - cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be reblogged' }, + reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, + cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, report: { id: 'status.report', defaultMessage: 'Report @{name}' } }); diff --git a/app/assets/javascripts/components/features/ui/components/onboarding_modal.jsx b/app/assets/javascripts/components/features/ui/components/onboarding_modal.jsx index 78ab646ee..6121b6058 100644 --- a/app/assets/javascripts/components/features/ui/components/onboarding_modal.jsx +++ b/app/assets/javascripts/components/features/ui/components/onboarding_modal.jsx @@ -213,7 +213,7 @@ class OnboardingModal extends React.PureComponent { if(hasMore) { nextOrDoneBtn = ; } else { - nextOrDoneBtn = ; + nextOrDoneBtn = ; } const styles = pages.map((page, i) => ({ diff --git a/app/assets/javascripts/components/locales/en.jsx b/app/assets/javascripts/components/locales/en.jsx index ae14843c1..b93633303 100644 --- a/app/assets/javascripts/components/locales/en.jsx +++ b/app/assets/javascripts/components/locales/en.jsx @@ -14,8 +14,8 @@ const en = { "account.edit_profile": "Edit profile", "account.follow": "Follow", "account.followers": "Followers", - "account.follows_you": "Follows you", "account.follows": "Follows", + "account.follows_you": "Follows you", "account.mention": "Mention @{name}", "account.mute": "Mute @{name}", "account.posts": "Posts", @@ -34,22 +34,33 @@ const en = { "column.mutes": "Muted users", "column.notifications": "Notifications", "column.public": "Federated timeline", + "column_back_button.label": "Back", + "column_subheading.navigation": "Navigation", + "column_subheading.settings": "Settings", + "compose_form.lock_disclaimer.lock": "locked", "compose_form.placeholder": "What is on your mind?", "compose_form.privacy_disclaimer": "Your private status will be delivered to mentioned users on {domains}. Do you trust {domainsCount, plural, one {that server} other {those servers}}? Post privacy only works on Mastodon instances. If {domains} {domainsCount, plural, one {is not a Mastodon instance} other {are not Mastodon instances}}, there will be no indication that your post is private, and it may be boosted or otherwise made visible to unintended recipients.", "compose_form.publish": "Toot", "compose_form.sensitive": "Mark media as sensitive", - "compose_form.spoiler_placeholder": "Content warning", "compose_form.spoiler": "Hide text behind warning", - "emoji_button.label": "Insert emoji", - "emoji_button.search": "Search...", - "emoji_button.people": "People", - "emoji_button.nature": "Nature", - "emoji_button.food": "Food & Drink", + "compose_form.spoiler_placeholder": "Content warning", + "confirmation_modal.cancel": "Cancel", + "confirmations.block.confirm": "Block", + "confirmations.block.message": "Are you sure you want to block {name}?", + "confirmations.delete.confirm": "Delete", + "confirmations.delete.message": "Are you sure you want to delete this status?", + "confirmations.mute.confirm": "Mute", + "confirmations.mute.message": "Are you sure you want to mute {name}?", "emoji_button.activity": "Activity", - "emoji_button.travel": "Travel & Places", - "emoji_button.objects": "Objects", - "emoji_button.symbols": "Symbols", "emoji_button.flags": "Flags", + "emoji_button.food": "Food & Drink", + "emoji_button.label": "Insert emoji", + "emoji_button.nature": "Nature", + "emoji_button.objects": "Objects", + "emoji_button.people": "People", + "emoji_button.search": "Search...", + "emoji_button.symbols": "Symbols", + "emoji_button.travel": "Travel & Places", "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home.public_timeline": "the public timeline", @@ -85,8 +96,8 @@ const en = { "notification.follow": "{name} followed you", "notification.mention": "{name} mentioned you", "notification.reblog": "{name} boosted your status", - "notifications.clear_confirmation": "Are you sure you want to permanently clear all your notifications?", "notifications.clear": "Clear notifications", + "notifications.clear_confirmation": "Are you sure you want to permanently clear all your notifications?", "notifications.column_settings.alert": "Desktop notifications", "notifications.column_settings.favourite": "Favourites:", "notifications.column_settings.follow": "New followers:", @@ -95,6 +106,26 @@ const en = { "notifications.column_settings.show": "Show in column", "notifications.column_settings.sound": "Play sound", "notifications.settings": "Column settings", + "onboarding.done": "Done", + "onboarding.next": "Next", + "onboarding.page_five.public_timelines": "The local timeline shows public posts from everyone on {domain}. The federated timeline shows public posts from everyone who people on {domain} follow. These are the Public Timelines, a great way to discover new people.", + "onboarding.page_four.home": "The home timeline shows posts from people you follow.", + "onboarding.page_four.notifications": "The notifications column shows when someone interacts with you.", + "onboarding.page_one.federation": "Mastodon is a network of independent servers joining up to make one larger social network. We call these servers: Instances", + "onboarding.page_one.handle": "You are on {domain}, so your full handle is {handle}", + "onboarding.page_one.welcome": "Welcome to Mastodon!", + "onboarding.page_six.admin": "Your instance's admin is {admin}.", + "onboarding.page_six.almost_done": "Almost done...", + "onboarding.page_six.appetoot": "Bon Appetoot!", + "onboarding.page_six.apps_available": "There are {apps} available for iOS, Android and other platforms.", + "onboarding.page_six.github": "Mastodon is free open-source software. You can report bugs, request features, or contribute to the code on {github}.", + "onboarding.page_six.guidelines": "community guidelines", + "onboarding.page_six.read_guidelines": "Please read {domain}'s {guidelines}!", + "onboarding.page_six.various_app": "mobile apps", + "onboarding.page_three.profile": "Edit your profile to change your avatar, bio, and display name. There, you will also find other preferences.", + "onboarding.page_three.search": "Use the search bar to find people and look at hashtags, such as {illustration} and {introductions}. To look for a person who is not on this instance, use their full handle.", + "onboarding.page_two.compose": "Write posts from the compose column. You can upload images, change privacy settings, and add content warnings with the icons below.", + "onboarding.skip": "Skip", "privacy.change": "Adjust status privacy", "privacy.direct.long": "Post to mentioned users only", "privacy.direct.short": "Direct", @@ -109,9 +140,10 @@ const en = { "report.placeholder": "Additional comments", "report.submit": "Submit", "report.target": "Reporting", - "search_results.total": "{count, number} {count, plural, one {result} other {results}}", "search.placeholder": "Search", "search.status_by": "Status by {name}", + "search_results.total": "{count, number} {count, plural, one {result} other {results}}", + "status.cannot_reblog": "This post cannot be boosted", "status.delete": "Delete", "status.favourite": "Favourite", "status.load_more": "Load more", @@ -119,7 +151,6 @@ const en = { "status.mention": "Mention @{name}", "status.open": "Expand this status", "status.reblog": "Boost", - "status.cannot_reblog": "This status cannot be boosted", "status.reblogged_by": "{name} boosted", "status.reply": "Reply", "status.replyAll": "Reply to thread", @@ -137,9 +168,9 @@ const en = { "upload_button.label": "Add media", "upload_form.undo": "Undo", "upload_progress.label": "Uploading...", + "video_player.expand": "Expand video", "video_player.toggle_sound": "Toggle sound", "video_player.toggle_visible": "Toggle visibility", - "video_player.expand": "Expand video", "video_player.video_error": "Video could not be played", };