#361 - fromRaw overload

This commit is contained in:
Vadim Lopatin 2017-06-05 12:31:36 +03:00
parent 77125ff563
commit 03e66d9c3d
2 changed files with 11 additions and 5 deletions

View File

@ -887,6 +887,7 @@
<File path="src\dlangui\core\dom.d" />
<File path="src\dlangui\core\editable.d" />
<File path="src\dlangui\core\events.d" />
<File path="src\dlangui\core\filemanager.d" />
<File path="src\dlangui\core\files.d" />
<File path="src\dlangui\core\i18n.d" />
<File path="src\dlangui\core\linestream.d" />
@ -914,6 +915,10 @@
<File path="src\dlangui\dml\parser.d" />
<File path="src\dlangui\dml\tokenizer.d" />
</Folder>
<Folder name="dom">
<File path="src\dlangui\dom\cssparser.d" />
<File path="src\dlangui\dom\encoding.d" />
</Folder>
<Folder name="graphics">
<Folder name="domrender">
<File path="src\dlangui\graphics\domrender\domrender.d" />
@ -947,10 +952,6 @@
<File path="src\dlangui\graphics\images.d" />
<File path="src\dlangui\graphics\resources.d" />
</Folder>
<Folder name="dom">
<File path="src\dlangui\dom\cssparser.d" />
<File path="src\dlangui\dom\encoding.d" />
</Folder>
<Folder name="platforms">
<Folder name="common">
<File path="src\dlangui\platforms\common\platform.d" />

View File

@ -145,11 +145,16 @@ struct UIString {
return UIString(ID, fallback);
}
/// Create UIString from raw string value - will not be translated
/// Create UIString from raw utf32 string value - will not be translated
static UIString fromRaw(dstring rawValue) {
return UIString(null, rawValue);
}
/// Create UIString from raw utf8 string value - will not be translated
static UIString fromRaw(string rawValue) {
return UIString(null, toUTF32(rawValue));
}
/** Default conversion to dstring */
alias value this;
}