mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
[i18n] Enable *nix tests again.
This commit is contained in:
@@ -92,15 +92,15 @@ parse_qt_linguist_from_slice :: proc(data: []u8, options := DEFAULT_PARSE_OPTION
|
|||||||
return translation, .TS_File_Expected_Translation
|
return translation, .TS_File_Expected_Translation
|
||||||
}
|
}
|
||||||
|
|
||||||
source := ts.elements[source_id]
|
source := strings.intern_get(&translation.intern, ts.elements[source_id].value)
|
||||||
xlat := ts.elements[translation_id]
|
xlat := strings.intern_get(&translation.intern, ts.elements[translation_id].value)
|
||||||
|
|
||||||
if source.value in section {
|
if source in section {
|
||||||
return translation, .Duplicate_Key
|
return translation, .Duplicate_Key
|
||||||
}
|
}
|
||||||
|
|
||||||
if has_plurals {
|
if has_plurals {
|
||||||
if xlat.value != "" {
|
if xlat != "" {
|
||||||
return translation, .TS_File_Expected_NumerusForm
|
return translation, .TS_File_Expected_NumerusForm
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ parse_qt_linguist_from_slice :: proc(data: []u8, options := DEFAULT_PARSE_OPTION
|
|||||||
if num_plurals < 2 {
|
if num_plurals < 2 {
|
||||||
return translation, .TS_File_Expected_NumerusForm
|
return translation, .TS_File_Expected_NumerusForm
|
||||||
}
|
}
|
||||||
section[source.value] = make([]string, num_plurals)
|
section[source] = make([]string, num_plurals)
|
||||||
|
|
||||||
num_plurals = 0
|
num_plurals = 0
|
||||||
for {
|
for {
|
||||||
@@ -124,15 +124,15 @@ parse_qt_linguist_from_slice :: proc(data: []u8, options := DEFAULT_PARSE_OPTION
|
|||||||
if !numerus_found {
|
if !numerus_found {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
numerus := ts.elements[numerus_id]
|
numerus := strings.intern_get(&translation.intern, ts.elements[numerus_id].value)
|
||||||
section[source.value][num_plurals] = strings.intern_get(&translation.intern, numerus.value)
|
section[source][num_plurals] = numerus
|
||||||
|
|
||||||
num_plurals += 1
|
num_plurals += 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Single translation
|
// Single translation
|
||||||
section[source.value] = make([]string, 1)
|
section[source] = make([]string, 1)
|
||||||
section[source.value][0] = strings.intern_get(&translation.intern, xlat.value)
|
section[source][0] = xlat
|
||||||
}
|
}
|
||||||
|
|
||||||
nth += 1
|
nth += 1
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ ODIN=../../odin
|
|||||||
PYTHON=$(shell which python3)
|
PYTHON=$(shell which python3)
|
||||||
|
|
||||||
all: download_test_assets image_test compress_test strings_test hash_test crypto_test noise_test encoding_test \
|
all: download_test_assets image_test compress_test strings_test hash_test crypto_test noise_test encoding_test \
|
||||||
math_test linalg_glsl_math_test filepath_test reflect_test os_exit_test
|
math_test linalg_glsl_math_test filepath_test reflect_test os_exit_test i18n_test
|
||||||
|
|
||||||
download_test_assets:
|
download_test_assets:
|
||||||
$(PYTHON) download_assets.py
|
$(PYTHON) download_assets.py
|
||||||
|
|||||||
Reference in New Issue
Block a user