File tree Expand file tree Collapse file tree
components/localization/glossary-entries/show Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export function TranslationHeader({ locale }: TranslationHeaderProps) {
1212 < div className = "text-h4" >
1313 { nameForLocale ( locale ) } ({ locale } )
1414 </ div >
15- < div className = "status" > Needs Reviewing </ div >
15+ < div className = "status" > Needs Sign-off </ div >
1616 < div className = "flag" > { flagForLocale ( locale ) } </ div >
1717 </ div >
1818 )
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ export function Unchecked({ translation }: { translation: GlossaryEntry }) {
8080 < div className = "body" >
8181 < p className = "text-16 leading-140 mb-10" >
8282 How should we translate this word in the context of Exercism? What is
83- the most natural equivelent in LANGUAGE.
83+ the most natural equivelent in{ ' ' }
84+ { nameForLocale ( translation . locale , { displayInEnglish : true } ) } ?
8485 </ p >
8586 < div className = "flex items-center gap-8 mb-12" >
8687 < div className = "text-16 w-[105px]" > Original (en):</ div >
Original file line number Diff line number Diff line change 11import { capitalize } from 'lodash'
22
3- export function nameForLocale ( locale : string ) {
3+ export function nameForLocale (
4+ locale : string ,
5+ options : { displayInEnglish ?: boolean } = { displayInEnglish : false }
6+ ) {
47 const [ language ] = locale . split ( '-' )
5- const languageName = new Intl . DisplayNames ( [ locale ] , { type : 'language' } ) . of (
6- language
7- )
8+ const displayLocale = options . displayInEnglish ? 'en' : locale
9+ const languageName = new Intl . DisplayNames ( [ displayLocale ] , {
10+ type : 'language' ,
11+ } ) . of ( language )
812
913 return capitalize ( languageName )
1014}
You can’t perform that action at this time.
0 commit comments