From 2e11a8da5b3d0031f99a7534b029f08dc0fe5a36 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Fri, 29 Apr 2022 13:02:40 +0200 Subject: [PATCH] [i18n] Move to `core:text/i18n`. --- core/{ => text}/i18n/example/i18n_example.odin | 5 +++-- core/{ => text}/i18n/example/messages.pot | 0 core/{ => text}/i18n/example/nl_NL.mo | Bin core/{ => text}/i18n/example/nl_NL.po | 0 core/{ => text}/i18n/gettext.odin | 0 core/{ => text}/i18n/i18n.odin | 0 core/{ => text}/i18n/qt_linguist.odin | 0 7 files changed, 3 insertions(+), 2 deletions(-) rename core/{ => text}/i18n/example/i18n_example.odin (91%) rename core/{ => text}/i18n/example/messages.pot (100%) rename core/{ => text}/i18n/example/nl_NL.mo (100%) rename core/{ => text}/i18n/example/nl_NL.po (100%) rename core/{ => text}/i18n/gettext.odin (100%) rename core/{ => text}/i18n/i18n.odin (100%) rename core/{ => text}/i18n/qt_linguist.odin (100%) diff --git a/core/i18n/example/i18n_example.odin b/core/text/i18n/example/i18n_example.odin similarity index 91% rename from core/i18n/example/i18n_example.odin rename to core/text/i18n/example/i18n_example.odin index 8c173ee4a..32eb38a7d 100644 --- a/core/i18n/example/i18n_example.odin +++ b/core/text/i18n/example/i18n_example.odin @@ -2,7 +2,7 @@ package i18n_example import "core:mem" import "core:fmt" -import "core:i18n" +import "core:text/i18n" _T :: i18n.get @@ -31,6 +31,7 @@ mo :: proc() { /* For ease of use, pluralized lookup can use both singular and plural form as key for the same translation. + This is a quirk of the GetText format which has separate keys for their different plurals. */ println("-----") printf(_T("There is %d leaf.\n", 1), 1) @@ -54,7 +55,7 @@ qt :: proc() { /* Parse QT file and set it as the active translation so we can omit `get`'s "catalog" parameter. */ - i18n.ACTIVE, err = i18n.parse_qt(#load("../../../tests/core/assets/XML/nl_NL-qt-ts.ts")) + i18n.ACTIVE, err = i18n.parse_qt(#load("../../../../tests/core/assets/XML/nl_NL-qt-ts.ts")) defer i18n.destroy() fmt.printf("parse_qt returned %v\n", err) diff --git a/core/i18n/example/messages.pot b/core/text/i18n/example/messages.pot similarity index 100% rename from core/i18n/example/messages.pot rename to core/text/i18n/example/messages.pot diff --git a/core/i18n/example/nl_NL.mo b/core/text/i18n/example/nl_NL.mo similarity index 100% rename from core/i18n/example/nl_NL.mo rename to core/text/i18n/example/nl_NL.mo diff --git a/core/i18n/example/nl_NL.po b/core/text/i18n/example/nl_NL.po similarity index 100% rename from core/i18n/example/nl_NL.po rename to core/text/i18n/example/nl_NL.po diff --git a/core/i18n/gettext.odin b/core/text/i18n/gettext.odin similarity index 100% rename from core/i18n/gettext.odin rename to core/text/i18n/gettext.odin diff --git a/core/i18n/i18n.odin b/core/text/i18n/i18n.odin similarity index 100% rename from core/i18n/i18n.odin rename to core/text/i18n/i18n.odin diff --git a/core/i18n/qt_linguist.odin b/core/text/i18n/qt_linguist.odin similarity index 100% rename from core/i18n/qt_linguist.odin rename to core/text/i18n/qt_linguist.odin