Merge branch 'i18n/ja' into dev

This commit is contained in:
Ben Grant 2021-06-05 15:56:07 +10:00
commit 6c4198de91
7 changed files with 260 additions and 9 deletions

View file

@ -112,7 +112,7 @@ const AvailabilityViewer = ({
onMouseEnter={(e) => {
const cellBox = e.currentTarget.getBoundingClientRect();
const wrapperBox = wrapper?.current?.getBoundingClientRect() ?? { x: 0, y: 0 };
const timeText = timeFormat === '12h' ? `h${locales[locale].separator}mma` : `HH${locales[locale].separator}mm`;
const timeText = timeFormat === '12h' ? `h${locales[locale].separator ?? ':'}mma` : `HH${locales[locale].separator ?? ':'}mm`;
setTooltip({
x: Math.round(cellBox.x-wrapperBox.x + cellBox.width/2),
y: Math.round(cellBox.y-wrapperBox.y + cellBox.height)+6,

View file

@ -4,42 +4,36 @@ const locales = {
import: () => import('dayjs/locale/de'),
weekStart: 1,
timeFormat: '24h',
separator: ':',
},
'en': { // English (US)
name: 'English (US)',
import: () => import('dayjs/locale/en'),
weekStart: 0,
timeFormat: '12h',
separator: ':',
},
'en-GB': { // English (UK)
name: 'English (UK)',
import: () => import('dayjs/locale/en-gb'),
weekStart: 1,
timeFormat: '12h',
separator: ':',
},
'es': { // Spanish
name: 'Español',
import: () => import('dayjs/locale/es'),
weekStart: 1,
timeFormat: '24h',
separator: ':',
},
'fr': { // French
name: 'Français',
import: () => import('dayjs/locale/fr'),
weekStart: 1,
timeFormat: '24h',
separator: ':',
},
'hi': { // Hindi
name: 'हिंदी',
import: () => import('dayjs/locale/hi'),
weekStart: 1,
timeFormat: '12h',
separator: ':',
},
'id': { // Indonesian
name: 'Indonesia',
@ -48,19 +42,23 @@ const locales = {
timeFormat: '24h',
separator: '.',
},
'ja': { // Japanese
name: '日本語',
import: () => import('dayjs/locale/ja'),
weekStart: 0,
timeFormat: '12h',
},
'ko': { // Korean
name: '한국어',
import: () => import('dayjs/locale/ko'),
weekStart: 0,
timeFormat: '24h',
separator: ':',
},
'ru': { // Russian
name: 'Pусский',
import: () => import('dayjs/locale/ru'),
weekStart: 1,
timeFormat: '24h',
separator: ':',
},
};