-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add table header translations #923
Conversation
TEST=none
[TableHeaders.DAY_OF_WEEK]: 'Veckodag', | ||
[TableHeaders.HOURS]: 'Timmar' | ||
} | ||
case 'zh-CH': |
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.
We're actually in the process of cutting over to 'zh-Hans' and 'zh-Hant'. Turns out, that's what LiveAPI and KG use instead. We want to be consistent with the rest of Yext. You should just be able to update the key names here.
static/js/utils.js
Outdated
* @returns {string} language | ||
*/ | ||
export function getLanguageFromLocale(locale) { | ||
const language = (locale === 'zh-CN' || locale === 'zh-TW') |
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.
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.
I see that connor made a parse locale function in his pr. will use it here once that's merge
static/js/open-status-i18n.js
Outdated
const language = (locale === 'zh-CN' || locale === 'zh-TW') ? | ||
locale : | ||
locale.substring(0,2); | ||
const language = getLanguageFromLocale(locale); |
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.
I have a PR open for the open status translations (#927) so this isn't needed here
TEST=none