-
Notifications
You must be signed in to change notification settings - Fork 123
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
Translate message "Nothing to show" #319
Changes from 4 commits
a470878
c6d7720
bfbc790
faff7d9
95c0967
44006b0
4c6ea27
2977b9d
9f780ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,14 @@ const translations = { | |
en: { | ||
'common.Toolbar.moveForward': 'Move forward', | ||
'common.Toolbar.moveBack': 'Move back', | ||
'nothingToShow': 'Nothing to show', | ||
'useContextMenu': 'Use toolbar or context menu to perform available actions' | ||
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. Please, rename the key to 'common.NoFilesFoundStub.message' according to convention in the issue https://opuscapita.atlassian.net/browse/EPROC-20549 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. Done |
||
}, | ||
fr: { | ||
'common.Toolbar.moveForward': 'Avancer', | ||
'common.Toolbar.moveBack': 'Revenir en arrière', | ||
'nothingToShow': 'Aucun élément à afficher', | ||
'useContextMenu': 'Utilisez la barre d\'outil ou le menu contextuel pour faire une action' | ||
}, | ||
zh: { | ||
'common.Toolbar.moveForward': '向前', | ||
|
@@ -39,6 +43,7 @@ const translations = { | |
}; | ||
|
||
export default function getMessage(locale, key, params) { | ||
console.log(locale, key, params); | ||
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. I'm not sure that we need to log it for every function call. Maybe remove it? |
||
let translationExists = (translations[locale] && translations[locale][key]); | ||
let translation = translationExists ? translations[locale][key] : translations['en'][key]; | ||
if (!params) { | ||
|
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.
Please, rename the key to 'common.NoFilesFoundStub.title' according to convention in the issue https://opuscapita.atlassian.net/browse/EPROC-20549