diff --git a/packages/ludic.i18n/mixed.ludic b/packages/ludic.i18n/mixed.ludic index 13bbeb49..a1576e37 100644 --- a/packages/ludic.i18n/mixed.ludic +++ b/packages/ludic.i18n/mixed.ludic @@ -2,8 +2,9 @@ # name + "\n" + its blurb): each marked name made in the language in use, then the line as English. Interim, # until every such line is a key of its own (26.9); a mark with arguments cannot be told from the line after it -# a key's name: its alphabet, and a full stop at its end left to the sentence -function kx_name_byte(c: int) -> bool { return (c >= 97 and c <= 122) or (c >= 65 and c <= 90) or (c >= 48 and c <= 57) or c == 95 or c == 46 or c == 45 } +# a key's name: a-z, 0-9, _ and . (every key the compiler derives or a game writes), a full stop at its +# end left to the sentence +function kx_name_byte(c: int) -> bool { return (c >= 97 and c <= 122) or (c >= 48 and c <= 57) or c == 95 or c == 46 } function kx_name_end(s: string, i: int) -> int { var e = i diff --git a/packages/ludic.i18n/tests/keys_test.ludic b/packages/ludic.i18n/tests/keys_test.ludic index 5ddbf7da..045692eb 100644 --- a/packages/ludic.i18n/tests/keys_test.ludic +++ b/packages/ludic.i18n/tests/keys_test.ludic @@ -91,6 +91,7 @@ program I18nKeysTest { let elk = tr(k"species.elk.a_name") expect(L(i18n_st, "Saw " + elk + ", 30 cm.") == "Saw an elk, 30 cm." and L(i18n_st, "Saw " + elk + ".") == "Saw an elk.") expect(L(i18n_st, elk + ": 30 cm") == "an elk: 30 cm" and L(i18n_st, elk + "\n" + tr(k"pause.quit")) == "an elk\nQuit") + expect(L(i18n_st, "Not owned. " + tr(k"pause.quit")) == "Not owned. Quit" and L(i18n_st, elk + "Quit") == "an elkQuit") expect(L(i18n_st, trf(k"catch.saw", "Seen: " + elk, "5:30", "", "")) == "You saw Seen: an elk at 5:30.") i18n_load_text(i18n_st, tt()) expect(L(i18n_st, "Day " + tr(k"pause.resume")) == "Devam. gun") # the name made, then the line's own pattern