Skip to content

Commit 96f9b48

Browse files
committed
Stringify script map
1 parent 7796f7b commit 96f9b48

File tree

3 files changed

+41
-38
lines changed

3 files changed

+41
-38
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ erl_crash.dump
2121

2222
# asfg
2323
.tool-versions
24+
25+
mise.toml

lib/cldr/locale_display/u.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule Cldr.LocaleDisplay.U do
7070
defp get(:dx, _key_name, value, _locale, _in_locale, display_names) do
7171
case get_script(value, display_names) do
7272
nil -> nil
73-
script -> String.downcase(script)
73+
%{standard: script} -> String.downcase(script)
7474
end
7575
end
7676

test/locale_display_name_test.exs

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,53 @@ defmodule Cldr.LocaleDisplayName.Test do
99
# * 344, 345 appear to have the wrong timezone returned
1010
# * 21,41 includes a field for a -u- tag that is invalid
1111
@invalid_test_results [21, 41, 344, 345, 1556, 1569, 1686, 1699]
12+
@invalid_test_results [41]
1213

1314
# These have test results with [] but I think they should remain ()
1415
# since there are no subtags or extensions.
1516
@results_should_be_parens [
16-
396,
17-
474,
18-
500,
19-
786,
20-
864,
21-
942,
22-
1124,
23-
1203,
24-
1254,
25-
1358,
26-
1384,
27-
1538,
28-
1928,
29-
2008,
30-
2188,
31-
2214,
32-
2242,
33-
2254,
34-
2268,
35-
2294,
36-
2500,
37-
2554,
38-
2580,
39-
2684,
40-
2708,
41-
2942,
42-
2968,
43-
2994,
44-
3020,
45-
3022,
46-
3126,
47-
3152,
48-
3178
17+
# 396,
18+
# 474,
19+
# 500,
20+
# 786,
21+
# 864,
22+
# 942,
23+
# 1124,
24+
# 1203,
25+
# 1254,
26+
# 1358,
27+
# 1384,
28+
# 1538,
29+
# 1928,
30+
# 2008,
31+
# 2188,
32+
# 2214,
33+
# 2242,
34+
# 2254,
35+
# 2268,
36+
# 2294,
37+
# 2500,
38+
# 2554,
39+
# 2580,
40+
# 2684,
41+
# 2708,
42+
# 2942,
43+
# 2968,
44+
# 2994,
45+
# 3020,
46+
# 3022,
47+
# 3126,
48+
# 3152,
49+
# 3178
4950
]
5051

5152
# The test results for these are what would be generated with
5253
# language_display: :standard, but the test specifies language_tag: :dialect
5354
@wrong_language_display [
54-
2370,
55-
2374,
56-
2375,
57-
2371
55+
# 2370,
56+
# 2374,
57+
# 2375,
58+
# 2371
5859
]
5960

6061
@except_lines @invalid_test_results ++ @results_should_be_parens ++ @wrong_language_display

0 commit comments

Comments
 (0)