Skip to content

Commit

Permalink
Added more language files in locales.
Browse files Browse the repository at this point in the history
Signed-off-by: GurukiranP <talk2gurukiran@gmail.com>
  • Loading branch information
gk-4VII committed Feb 22, 2024
1 parent dc30457 commit 62b73e1
Show file tree
Hide file tree
Showing 6 changed files with 2,127 additions and 6 deletions.
12 changes: 10 additions & 2 deletions oidc-ui/public/locales/default.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"languages_2Letters": {
"en": "English",
"ar": "عربى"
"hi": "हिंदी",
"ar": "عربى",
"kn": "ಕನ್ನಡ",
"ta": "தமிழ்",
"km": "ខ្មែរ"
},
"rtlLanguages": ["ar"],
"langCodeMapping": {
"eng": "en",
"ara": "ar"
"hin": "hi",
"ara": "ar",
"kan": "kn",
"tam": "ta",
"khm": "km"
}
}
527 changes: 527 additions & 0 deletions oidc-ui/public/locales/hi.json

Large diffs are not rendered by default.

526 changes: 526 additions & 0 deletions oidc-ui/public/locales/km.json

Large diffs are not rendered by default.

527 changes: 527 additions & 0 deletions oidc-ui/public/locales/kn.json

Large diffs are not rendered by default.

527 changes: 527 additions & 0 deletions oidc-ui/public/locales/ta.json

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions oidc-ui/src/components/NavHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ export default function NavHeader({ langOptions, i18nKeyPrefix = "header" }) {
}, [langOptions]);

var dropdownItemClass =
"group text-[14px] leading-none flex items-center relative select-none outline-none data-[disabled]:pointer-events-none hover:font-bold cursor-pointer py-2 first:border-b-[1px]";
"group text-[14px] leading-none flex items-center relative select-none outline-none data-[disabled]:pointer-events-none hover:font-bold cursor-pointer py-2";

var borderBottomClass = "border-b-[1px]";

return (
<nav className="bg-white border-gray-500 md:px-[4rem] py-2 px-[0.5rem] navbar-header" id="navbar-header">
<div className="flex justify-between">
Expand Down Expand Up @@ -189,13 +191,17 @@ export default function NavHeader({ langOptions, i18nKeyPrefix = "header" }) {
className="min-w-[220px] bg-white rounded-md shadow-md will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade px-3 py-2 border border-[#BCBCBC] outline-0 relative top-[-0.5rem]"
sideOffset={5}
>
{langOptions.map((key) => (
{langOptions.map((key, idx) => (
<DropdownMenu.Item
key={key.value}
className={
i18n.language === key.value
? `font-bold ${dropdownItemClass}`
: dropdownItemClass
? langOptions.length - 1 !== idx
? `font-bold ${dropdownItemClass} ${borderBottomClass}`
: `font-bold ${dropdownItemClass}`
: langOptions.length - 1 !== idx
? `${dropdownItemClass} ${borderBottomClass}`
: `${dropdownItemClass}`
}
onSelect={() => changeLanguageHandler (key)}
>
Expand Down

0 comments on commit 62b73e1

Please sign in to comment.