mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Adress review
1) Add NOTE about brute-force deunicode 2) Fix ut8 -> utf8 typo in comment
This commit is contained in:
parent
d26422dc29
commit
f104085a85
@ -152,6 +152,11 @@ impl assets::Compound for Language {
|
||||
let source: &raw::Resource = &*handle.read();
|
||||
let src = source.src.clone();
|
||||
|
||||
// NOTE:
|
||||
// This deunicode whole file, which mean it may break if
|
||||
// we have non-ascii keys.
|
||||
// I don't consider this a problem, because having
|
||||
// non-ascii keys is quite exotic.
|
||||
let src = if convert_utf8_to_ascii {
|
||||
deunicode(&src)
|
||||
} else {
|
||||
|
@ -25,7 +25,7 @@ impl crate::assets::Asset for Manifest {
|
||||
//
|
||||
// NOTE:
|
||||
// We store String, that later converted to FluentResource.
|
||||
// We can't do it at load time, because we might want to do ut8 to ascii
|
||||
// We can't do it at load time, because we might want to do utf8 to ascii
|
||||
// conversion and we know it only after we've loaded language manifest.
|
||||
//
|
||||
// Alternative solution is to make it hold Rc/Arc around FluentResource,
|
||||
|
Loading…
Reference in New Issue
Block a user