diff --git a/Assets/locale/de.json b/Assets/locale/de.json index 9765022c..fc57f3c2 100644 --- a/Assets/locale/de.json +++ b/Assets/locale/de.json @@ -271,7 +271,7 @@ "Error: Mesh has no UVs, generating defaults": "Fehler: Mesh hat keine UVs, sodass Vorgabewerte erzeugt werden", "Error: Check internet connection to access the cloud": "Fehler: Internetverbindung für den Cloudzugriff prüfen", "Info: Asset already imported": "Info: Asset bereits importiert", - "Textures exported.": "Texturen exportiert.", + "Textures exported": "Texturen exportiert.", "Folder does not contain textures": "Ordner enthält keine Texturen", "Not a valid GIMP color palette": "Keine korrekte GIMP-Farbpalette", "Keymap imported:": "Tastenbelegung importiert:", @@ -479,7 +479,7 @@ "Picked Color": "Gewählte Farbe", "Color ID Map": "Color ID Map", "Color ID": "Farb ID", - "Drag and drop picked color to swatches, materials, layers or to the node editor.": "Gewählte Farbe per Drag & Drop in Farbfeldern, Materialien, Ebenen pder dem Node Editor ablegen.", + "Drag and drop picked color to swatches, materials, layers or to the node editor": "Gewählte Farbe per Drag & Drop in Farbfeldern, Materialien, Ebenen pder dem Node Editor ablegen.", "Add Swatch": "Farbfeld hinzufügen", "Add picked color to swatches": "Gewählte Farbe zu Farbfeldern hinzufügen", "Base": "Basis", diff --git a/Assets/locale/ja.json b/Assets/locale/ja.json index c34f7406..306f326e 100644 --- a/Assets/locale/ja.json +++ b/Assets/locale/ja.json @@ -271,7 +271,7 @@ "Error: Mesh has no UVs, generating defaults": "エラー: メッシュにUVがなく、デフォルトが生成されます", "Error: Check internet connection to access the cloud": "エラー: クラウドにアクセスするにはインターネット接続を確認してください", "Info: Asset already imported": "情報: アセットはすでにインポートされています", - "Textures exported.": "エクスポートされたテクスチャ", + "Textures exported": "エクスポートされたテクスチャ", "Folder does not contain textures": "フォルダーにテクスチャが含まれていません", "Not a valid GIMP color palette": "有効なGIMPカラーパレットではありません", "Keymap imported:": "インポートされたキーマップ:", @@ -481,7 +481,7 @@ "Picked Color": "選択した色", "Color ID Map": "カラーIDマップ", "Color ID": "カラーID", - "Drag and drop picked color to swatches, materials, layers or to the node editor.": "選択した色をスウォッチ、マテリアル、レイヤー、またはノードエディタにドラッグアンドドロップします", + "Drag and drop picked color to swatches, materials, layers or to the node editor": "選択した色をスウォッチ、マテリアル、レイヤー、またはノードエディタにドラッグアンドドロップします", "Add Swatch": "スウォッチを追加", "Add picked color to swatches": "選択した色をスウォッチへ追加します", "Base": "ベース", diff --git a/Sources/arm/io/ExportArm.hx b/Sources/arm/io/ExportArm.hx index 0c90331b..9f1d84a9 100644 --- a/Sources/arm/io/ExportArm.hx +++ b/Sources/arm/io/ExportArm.hx @@ -176,7 +176,7 @@ class ExportArm { recent.unshift(recent_path); Config.save(); - Console.info("Project saved."); + Console.info(tr("Project saved")); } static function exportNode(n: TNode, assets: Array = null) { diff --git a/Sources/arm/io/ExportTexture.hx b/Sources/arm/io/ExportTexture.hx index dd2c9348..f17d59c4 100644 --- a/Sources/arm/io/ExportTexture.hx +++ b/Sources/arm/io/ExportTexture.hx @@ -90,9 +90,9 @@ class ExportTexture { #end #if krom_ios - Console.info(tr("Textures exported.") + " ('Files/On My iPad/" + Main.title + "')"); + Console.info(tr("Textures exported") + " ('Files/On My iPad/" + Main.title + "')"); #else - Console.info(tr("Textures exported.")); + Console.info(tr("Textures exported")); #end @:privateAccess UIFiles.lastPath = ""; } diff --git a/Sources/arm/io/ImportGpl.hx b/Sources/arm/io/ImportGpl.hx index ac99841f..71411105 100644 --- a/Sources/arm/io/ImportGpl.hx +++ b/Sources/arm/io/ImportGpl.hx @@ -9,45 +9,45 @@ class ImportGpl { public static function run(path: String, replaceExisting: Bool) { Data.getBlob(path, function(b: Blob) { - var swatches = []; - try { - var input = new BytesInput(b.bytes); - // GIMP's color palette importer: https://gitlab.gnome.org/GNOME/gimp/-/blob/gimp-2-10/app/core/gimppalette-load.c#L39 - if (!input.readLine().startsWith("GIMP Palette")) { - Console.error(tr("Not a valid GIMP color palette")); - return; - } + var swatches = []; + try { + var input = new BytesInput(b.bytes); + // GIMP's color palette importer: https://gitlab.gnome.org/GNOME/gimp/-/blob/gimp-2-10/app/core/gimppalette-load.c#L39 + if (!input.readLine().startsWith("GIMP Palette")) { + Console.error(tr("Not a valid GIMP color palette")); + return; + } - var delimiter = ~/\s+/ig; - while (true) { - var line = input.readLine(); - if (line.startsWith("Name:")) continue; - else if (line.startsWith("Columns:")) continue; - else if (line.startsWith("#")) continue; - else { - var tokens = delimiter.split(line); - if (tokens.length < 3) continue; - var swatch = Project.makeSwatch(Color.fromBytes(Std.parseInt(tokens[0]), Std.parseInt(tokens[1]), Std.parseInt(tokens[2]))); - swatches.push(swatch); + var delimiter = ~/\s+/ig; + while (true) { + var line = input.readLine(); + if (line.startsWith("Name:")) continue; + else if (line.startsWith("Columns:")) continue; + else if (line.startsWith("#")) continue; + else { + var tokens = delimiter.split(line); + if (tokens.length < 3) continue; + var swatch = Project.makeSwatch(Color.fromBytes(Std.parseInt(tokens[0]), Std.parseInt(tokens[1]), Std.parseInt(tokens[2]))); + swatches.push(swatch); + } } } - } - catch (e: haxe.io.Eof) { - // Is thrown if end of file is reached. - } - if (replaceExisting) { - Project.raw.swatches = []; - - if (swatches.length == 0) { // No swatches contained - Project.raw.swatches.push(Project.makeSwatch()); + catch (e: haxe.io.Eof) { + // Is thrown if end of file is reached } - } + if (replaceExisting) { + Project.raw.swatches = []; - if (swatches.length > 0) { - for (s in swatches) { - Project.raw.swatches.push(s); + if (swatches.length == 0) { // No swatches contained + Project.raw.swatches.push(Project.makeSwatch()); + } } - } - }); + + if (swatches.length > 0) { + for (s in swatches) { + Project.raw.swatches.push(s); + } + } + }); } } diff --git a/Sources/arm/ui/BoxPreferences.hx b/Sources/arm/ui/BoxPreferences.hx index d0948f28..945e6064 100644 --- a/Sources/arm/ui/BoxPreferences.hx +++ b/Sources/arm/ui/BoxPreferences.hx @@ -566,7 +566,7 @@ plugin.drawUI = function(ui) { iron.data.Data.getBlob("plugins/" + f, function(blob: kha.Blob) { TabScript.hscript.text = blob.toString(); iron.data.Data.deleteBlob("plugins/" + f); - Console.info("Script opened"); + Console.info(tr("Script opened")); }); } diff --git a/Sources/arm/ui/TabSwatches.hx b/Sources/arm/ui/TabSwatches.hx index a211b7ad..815562dc 100644 --- a/Sources/arm/ui/TabSwatches.hx +++ b/Sources/arm/ui/TabSwatches.hx @@ -207,14 +207,14 @@ class TabSwatches { } } - // Draw the rightmost line next to the last swatch. + // Draw the rightmost line next to the last swatch if (App.dragSwatch != null && dragPosition == Project.raw.swatches.length) { ui._x = uix; // Reset the position because otherwise it would start in the row below ui._y = uiy; ui.fill(28, -2, 2, 32, ui.t.HIGHLIGHT_COL); } - // Currently there is no valid dragPosition so reset it. + // Currently there is no valid dragPosition so reset it if (!dragPositionSet) dragPosition = -1; diff --git a/Sources/arm/ui/UIHeader.hx b/Sources/arm/ui/UIHeader.hx index 09a95c3e..17427818 100644 --- a/Sources/arm/ui/UIHeader.hx +++ b/Sources/arm/ui/UIHeader.hx @@ -97,7 +97,7 @@ class UIHeader { App.dragOffY = -(mouse.y - uiy - ui._windowY + 1); App.dragSwatch = Project.cloneSwatch(Context.pickedColor); } - if (ui.isHovered) ui.tooltip(tr("Drag and drop picked color to swatches, materials, layers or to the node editor.")); + if (ui.isHovered) ui.tooltip(tr("Drag and drop picked color to swatches, materials, layers or to the node editor")); if (ui.isHovered && ui.inputReleased) { UIMenu.draw(function(ui) { ui.fill(0, 0, ui._w / ui.ops.scaleFactor, ui.t.ELEMENT_H * 9, ui.t.SEPARATOR_COL); diff --git a/Sources/arm/ui/UIMenu.hx b/Sources/arm/ui/UIMenu.hx index 8b950365..7c24935c 100644 --- a/Sources/arm/ui/UIMenu.hx +++ b/Sources/arm/ui/UIMenu.hx @@ -63,7 +63,7 @@ class UIMenu { if (menuButton(ui, tr("Import Envmap..."))) { UIFiles.show("hdr", false, false, function(path: String) { if (!path.endsWith(".hdr")) { - Console.error("Error: .hdr file expected"); + Console.error(tr("Error: .hdr file expected")); return; } ImportAsset.run(path);