bsky-app/src/locale/__tests__/helpers.test.ts
Danni d7f4e1391c
Add Indonesian localization (#2356)
* Add Indonesian (id) locale

* Add Indonesian translation messages

* Update team number and add some translation

* Update for better ID translation

* Apply suggestions from code review

Co-authored-by: Aditya Dirgantara <ccoremapd@icloud.com>
Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Aditya Dirgantara <ccoremapd@icloud.com>

* Apply suggestions from code review

Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>

* Change translation post to postingan

* Update translation

* Fix error

* Apply suggestions from code review

Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>

* Add Thinkbyte1024 and mary-ext to language team ID

* Update username to lowercase

---------

Co-authored-by: Aditya Dirgantara <ccoremapd@icloud.com>
Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>
Co-authored-by: Ansh <anshnanda10@gmail.com>
2024-01-10 02:17:48 +05:30

14 lines
661 B
TypeScript

import {test, expect} from '@jest/globals'
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
import {AppLanguage} from '#/locale/languages'
test('sanitizeAppLanguageSetting', () => {
expect(sanitizeAppLanguageSetting('en')).toBe(AppLanguage.en)
expect(sanitizeAppLanguageSetting('pt-BR')).toBe(AppLanguage.pt_BR)
expect(sanitizeAppLanguageSetting('hi')).toBe(AppLanguage.hi)
expect(sanitizeAppLanguageSetting('id')).toBe(AppLanguage.id)
expect(sanitizeAppLanguageSetting('foo')).toBe(AppLanguage.en)
expect(sanitizeAppLanguageSetting('en,foo')).toBe(AppLanguage.en)
expect(sanitizeAppLanguageSetting('foo,en')).toBe(AppLanguage.en)
})