bsky-app/src/locale/i18n.ts

127 lines
4.6 KiB
TypeScript
Raw Normal View History

Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
import '@formatjs/intl-locale/polyfill'
import '@formatjs/intl-pluralrules/polyfill'
import '@formatjs/intl-pluralrules/locale-data/en'
import {useEffect} from 'react'
import {i18n} from '@lingui/core'
2024-04-04 01:50:15 +02:00
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
import {AppLanguage} from '#/locale/languages'
import {messages as messagesCa} from '#/locale/locales/ca/messages'
2024-01-24 05:39:35 +01:00
import {messages as messagesDe} from '#/locale/locales/de/messages'
2024-04-04 01:50:15 +02:00
import {messages as messagesEn} from '#/locale/locales/en/messages'
import {messages as messagesEs} from '#/locale/locales/es/messages'
2024-02-19 07:09:49 +01:00
import {messages as messagesFi} from '#/locale/locales/fi/messages'
import {messages as messagesFr} from '#/locale/locales/fr/messages'
import {messages as messagesGa} from '#/locale/locales/ga/messages'
import {messages as messagesHi} from '#/locale/locales/hi/messages'
2024-04-04 01:50:15 +02:00
import {messages as messagesId} from '#/locale/locales/id/messages'
import {messages as messagesIt} from '#/locale/locales/it/messages'
import {messages as messagesJa} from '#/locale/locales/ja/messages'
import {messages as messagesKo} from '#/locale/locales/ko/messages'
import {messages as messagesPt_BR} from '#/locale/locales/pt-BR/messages'
2024-04-04 01:50:15 +02:00
import {messages as messagesTr} from '#/locale/locales/tr/messages'
2024-01-03 21:22:55 +01:00
import {messages as messagesUk} from '#/locale/locales/uk/messages'
import {messages as messagesZh_CN} from '#/locale/locales/zh-CN/messages'
Add zh-TW localization (#2781) * add zh-TW localization * fix typo * fix languages.ts * improve translation * improve translation * 部分翻譯修正 - 使用全形標點符號 - 將部分簡體字修正為正體字 - 更改部分用語 * fix incorrectly commented strings * small fix and suggestion * update translation team * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * modify the translation based on the review suggestions * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * modify translation by review * modify translation by review * modify translation by review * modify translation by review * modify translation by review * modify translation by review * minor fixes * minor fixes * Update messages.po * translate new strings * fix typo * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update messages.po * Update messages.po * Update messages.po * Update messages.po * fixed typo * Update messages.po * correct translation * Update messages.po * modify translation by review * Update messages.po * Update messages.po --------- Co-authored-by: noeFly <jeffyang0123@gmail.com> Co-authored-by: Kuwa Lee <kuwalee1069@gmail.com> Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com>
2024-04-03 23:30:04 +02:00
import {messages as messagesZh_TW} from '#/locale/locales/zh-TW/messages'
2024-04-04 01:50:15 +02:00
import {useLanguagePrefs} from '#/state/preferences'
/**
* We do a dynamic import of just the catalog that we need
*/
export async function dynamicActivate(locale: AppLanguage) {
switch (locale) {
case AppLanguage.ca: {
i18n.loadAndActivate({locale, messages: messagesCa})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/ca')
break
}
2024-01-24 05:39:35 +01:00
case AppLanguage.de: {
i18n.loadAndActivate({locale, messages: messagesDe})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/de')
2024-01-24 05:39:35 +01:00
break
}
case AppLanguage.es: {
i18n.loadAndActivate({locale, messages: messagesEs})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/es')
break
}
2024-03-19 21:04:45 +01:00
case AppLanguage.fi: {
2024-02-19 06:42:07 +01:00
i18n.loadAndActivate({locale, messages: messagesFi})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/fi')
2024-02-19 06:42:07 +01:00
break
2024-03-19 21:04:45 +01:00
}
case AppLanguage.fr: {
i18n.loadAndActivate({locale, messages: messagesFr})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/fr')
break
}
case AppLanguage.ga: {
i18n.loadAndActivate({locale, messages: messagesGa})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/ga')
break
}
case AppLanguage.hi: {
i18n.loadAndActivate({locale, messages: messagesHi})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/hi')
break
}
case AppLanguage.id: {
i18n.loadAndActivate({locale, messages: messagesId})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/id')
break
}
case AppLanguage.it: {
i18n.loadAndActivate({locale, messages: messagesIt})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/it')
break
}
case AppLanguage.ja: {
i18n.loadAndActivate({locale, messages: messagesJa})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/ja')
break
}
case AppLanguage.ko: {
i18n.loadAndActivate({locale, messages: messagesKo})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/ko')
break
}
case AppLanguage.pt_BR: {
i18n.loadAndActivate({locale, messages: messagesPt_BR})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/pt')
break
}
case AppLanguage.tr: {
i18n.loadAndActivate({locale, messages: messagesTr})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/tr')
2024-01-03 21:22:55 +01:00
break
}
case AppLanguage.uk: {
i18n.loadAndActivate({locale, messages: messagesUk})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/uk')
2024-01-19 06:54:00 +01:00
break
}
case AppLanguage.zh_CN: {
i18n.loadAndActivate({locale, messages: messagesZh_CN})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/zh')
2024-02-13 19:01:59 +01:00
break
}
Add zh-TW localization (#2781) * add zh-TW localization * fix typo * fix languages.ts * improve translation * improve translation * 部分翻譯修正 - 使用全形標點符號 - 將部分簡體字修正為正體字 - 更改部分用語 * fix incorrectly commented strings * small fix and suggestion * update translation team * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * modify the translation based on the review suggestions * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * modify translation by review * modify translation by review * modify translation by review * modify translation by review * modify translation by review * modify translation by review * minor fixes * minor fixes * Update messages.po * translate new strings * fix typo * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update messages.po * Update messages.po * Update messages.po * Update messages.po * fixed typo * Update messages.po * correct translation * Update messages.po * modify translation by review * Update messages.po * Update messages.po --------- Co-authored-by: noeFly <jeffyang0123@gmail.com> Co-authored-by: Kuwa Lee <kuwalee1069@gmail.com> Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com>
2024-04-03 23:30:04 +02:00
case AppLanguage.zh_TW: {
i18n.loadAndActivate({locale, messages: messagesZh_TW})
Replace pluralize by plural by @tkusano (#3882) * Replace pluralize with plural or Plural * Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable. * Delete pluralize() and related test. * Import @formatjs polyfill libraries for plural on ios and android - ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'. - update `plural` use in notification messages for better translation. * Rewrite to pass lint * Add Catalan plural polyfill * more replacement * import zh plural data for zh-CN * Refactor feed header components (#2964) * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic * Rename Home Feed Prefs to Following Feed Prefs (#2965) * use `useOpenLink` hook for links in ALF (#2975) * use `useOpenLink` hook for links in ALF * web only for `outline` * increase timeout to 15s (#2958) * Normalize relative day (#2874) * fix: normalize relative date * chore: add comments * refactor: skip flooring normalized diff * refactor: let -> const * fix: get own copy of date to prevent mutating * refactor: rounding does the same trick * Add handle validation to create account UI (#2959) * show uiState errors in the box as well simplify copy update ui for only letters and numbers add ui validation to handle selection * simplify names * Fix accidental text-node render --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Make dim theme dim (#2966) * Make dim color scheme dim * Tweaks * Overall tweaks * We have to go darker * Tweak saturation of blues in dim * Increase contrast on dark-dark mode * adjust dim --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Hailey <me@haileyok.com> * Fix dim mode unread notif color * use `showControls` to show/hide live text icon on ios (#2982) * Update .po files * fix reversed icons in validator 🤦 (#2991) * Adjust `windowSize` on `PostThread` `FlatList` (#2989) * adjust window size, cells batching period * rm batching period change * Pluralize 'follow(s)' * Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer. * pluralie '# following' * Fix & Update * Rewrite to use Plural * rmeove unused import * When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main * Revert simple-import-sort/imports related changes * Move ProfileHoverCard web to plural util * Followings -> following * Add plural following to hovercard * Followings -> Following --------- Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 01:55:57 +02:00
await import('@formatjs/intl-pluralrules/locale-data/zh')
2024-04-04 01:50:15 +02:00
break
}
default: {
i18n.loadAndActivate({locale, messages: messagesEn})
break
}
}
}
export async function useLocaleLanguage() {
const {appLanguage} = useLanguagePrefs()
useEffect(() => {
dynamicActivate(sanitizeAppLanguageSetting(appLanguage))
}, [appLanguage])
}