Skip to content

Commit

Permalink
BL-138 resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed May 23, 2024
1 parent cc30d79 commit 8baa948
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ public Object _invoke( IBoxContext context, ArgumentsScope arguments ) {
put( Key.country, locale.getISO3Country() );
// Note this replicates the Lucee behavior where the ISO object returns the non-iso3 language
// and the top level language key returns the iso3 version
put( Key.language, locale.getLanguage() );
put( Key.language, locale.getISO3Language() );
}
}
) );
put( Key.language, locale.getISO3Language() );
put( Key.language, locale.getLanguage() );
put(
Key.of( "name" ),
String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void testGetLocaleInfoNoArgs() {
assertTrue( infoStruct.containsKey( "name" ) );
assertTrue( infoStruct.containsKey( "variant" ) );
assertEquals( infoStruct.getAsString( Key.country ), "US" );
assertEquals( infoStruct.getAsString( Key.language ), "eng" );
assertEquals( infoStruct.getAsString( Key.language ), "en" );
assertEquals( infoStruct.getAsString( Key.of( "name" ) ), "English (United States)" );
assertEquals( infoStruct.getAsString( Key.variant ), "" );
}
Expand All @@ -113,7 +113,7 @@ public void testGetLocaleInfo() {
assertTrue( infoStruct.containsKey( "name" ) );
assertTrue( infoStruct.containsKey( "variant" ) );
assertEquals( infoStruct.getAsString( Key.country ), "US" );
assertEquals( infoStruct.getAsString( Key.language ), "eng" );
assertEquals( infoStruct.getAsString( Key.language ), "en" );
assertEquals( infoStruct.getAsString( Key.of( "name" ) ), "English (United States)" );
assertEquals( infoStruct.getAsString( Key.variant ), "" );
}
Expand All @@ -139,7 +139,7 @@ public void testGetLocaleInfoGerman() {
assertTrue( infoStruct.containsKey( "name" ) );
assertTrue( infoStruct.containsKey( "variant" ) );
assertEquals( infoStruct.getAsString( Key.country ), "US" );
assertEquals( infoStruct.getAsString( Key.language ), "eng" );
assertEquals( infoStruct.getAsString( Key.language ), "en" );
assertEquals( infoStruct.getAsString( Key.of( "name" ) ), "Englisch (Vereinigte Staaten)" );
assertEquals( infoStruct.getAsString( Key.variant ), "" );
assertEquals( infoStruct.getAsStruct( Key.display ).getAsString( Key.country ), "Vereinigte Staaten" );
Expand Down Expand Up @@ -167,7 +167,7 @@ public void testGetLocaleInfoChinese() {
assertTrue( infoStruct.containsKey( "name" ) );
assertTrue( infoStruct.containsKey( "variant" ) );
assertEquals( infoStruct.getAsString( Key.country ), "US" );
assertEquals( infoStruct.getAsString( Key.language ), "eng" );
assertEquals( infoStruct.getAsString( Key.language ), "en" );
assertEquals( infoStruct.getAsString( Key.of( "name" ) ), "英语 (美国)" );
assertEquals( infoStruct.getAsString( Key.variant ), "" );
assertEquals( infoStruct.getAsStruct( Key.display ).getAsString( Key.country ), "美国" );
Expand Down

0 comments on commit 8baa948

Please sign in to comment.