This repository has been archived by the owner on Jun 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 154
Chinese translations and intl demo #382
Open
zianke
wants to merge
18
commits into
joshwcomeau:feature-i18n
Choose a base branch
from
zianke:i18n
base: feature-i18n
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
21f1474
Init message descriptor for ApplicationMenu
zianke a8bedd5
yarn add react-intl
zianke ff1715f
List message decriptors for ApplicationMenu
zianke 9574a4b
Update languageCaptions in ApplicationMenu (#381)
zianke ebdcf86
Merge branch 'i18n-app-menu-item' into i18n
zianke e789dd9
add message file for several components
llllish 0fc2593
write .message for components
llllish 646ee3d
add translation files for IntroScreen
llllish 03f8bb2
Intl demo on IntroScreen
zianke 7411c8c
Fix bug in State type
zianke 56e7ddd
Add tests for Intl reducer
zianke 08929ad
Translate all CreateNewProjectWizard messages
zianke 3f32c0c
Complete tranlation for CreateNewProjectWizard
zianke c9fd28f
Tranlate all DependencyManagementPane messages
zianke a7e50f4
Minor update on translation
zianke 160896e
Minor update
zianke ddc105d
Intl on BuildPane
zianke 0af9245
Add new translations
zianke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/components/AppSettingsModal/AppSettingsModal.message.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,62 @@ | ||||||
// @flow | ||||||
import { defineMessages } from 'react-intl'; | ||||||
|
||||||
const messages = { | ||||||
main: { | ||||||
title: { | ||||||
id: 'appSettingsModal.main.title', | ||||||
defaultMessage: 'Preferences', | ||||||
description: 'Title for the whole "Preferences" part', | ||||||
}, | ||||||
errorMessage: { | ||||||
id: 'appSettingsModal.main.errorMessage', | ||||||
defaultMessage: "Path doesn't exist.", | ||||||
description: "Error message if project folder doesn't exist", | ||||||
}, | ||||||
errorPrompt: { | ||||||
id: 'appSettingsModal.main.errorPrompt', | ||||||
defaultMessage: | ||||||
'Please check your default project path or use the directory picker to select the path.', | ||||||
description: "Prompt message if project folder doesn't exist", | ||||||
}, | ||||||
save: { | ||||||
id: 'appSettingsModal.main.save', | ||||||
defaultMessage: 'Save', | ||||||
description: 'Text for the save button', | ||||||
}, | ||||||
}, | ||||||
general: { | ||||||
title: { | ||||||
id: 'appSettingsModal.general.title', | ||||||
defaultMessage: 'General', | ||||||
description: 'Title for the "General" part', | ||||||
}, | ||||||
projectPath: { | ||||||
id: 'appSettingsModal.general.projectPath', | ||||||
defaultMessage: 'Default Project Path', | ||||||
description: 'Title for "Default Project Path" under the "General" part', | ||||||
}, | ||||||
projectType: { | ||||||
id: 'appSettingsModal.general.projectType', | ||||||
defaultMessage: 'Default Project Type', | ||||||
description: 'Title for "Default Project Type" under the "General" part', | ||||||
}, | ||||||
}, | ||||||
privacy: { | ||||||
title: { | ||||||
id: 'appSettingsModal.privacy.title', | ||||||
defaultMessage: 'Privacy', | ||||||
description: 'Title for the "Privacy" part', | ||||||
}, | ||||||
enableUsageTracking: { | ||||||
id: 'appSettingsModal.privacy.enableUsageTracking', | ||||||
defaultMessage: 'Enable anonymous usage tracking', | ||||||
description: | ||||||
'Title for "Enable anonymous usage tracking" under the "privacy" part', | ||||||
}, | ||||||
}, | ||||||
}; | ||||||
|
||||||
const definedMessages = defineMessages(messages); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I think we can directly do a default export as
Suggested change
|
||||||
|
||||||
export default definedMessages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please pin the version by removing the
^
for react-intl and react-intl-redux.