armory3d / armory3d/armory

Language support (in particular, RU)

Open
#1,937 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug zui
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Description
At the moment, empty lines (spaces) are displayed instead of text in the UI in my language.

  • If I try to specify text in the UI editor, then the field will be empty:
    editor_ui

But the .json file contains the correct text:
ui_json

  • If we write in a logical node, then we get an error:
    result_ln_settext

Malformed file. Source files must be encoded with UTF-8.
As a result, it is exported to the code as follows:
result_ln

  • If you write Haxe in the script, then it will be output to the console, but not by the engine in the UI.
    The code:
package arm;
import iron.Scene;
import armory.trait.internal.CanvasScript;

class SetText extends iron.Trait {
	public function new() {
		super();

		notifyOnUpdate(function() {
			var str_hello = "Привет";
			trace("Check trace: " + str_hello);
			var canvas = Scene.active.getTrait(CanvasScript);
			if (canvas == null) canvas = Scene.active.camera.getTrait(CanvasScript);
			var e = canvas.getElement("str_ru");
			if (e != null) e.text = str_hello;
			trace("Check text element: " + e.text);
		});
	}
}

Result:
result_code
As an experiment, the Text object from Blender is also displayed and, as you can see in the picture, everything is displayed correctly.

P.S. For all elements, the font Alice was specified, which supports the language.

System
Blender: 2.83.7
Armory: git, master (e9c351c)
OS: Windows 10 64-bit
Graphics card: NVIDIA GeForce 930M

Test File
lang_ru.zip

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the attached lang_ru.zip in Blender 2.83.7 on the reported Armory revision. Check the UI editor, logical node text, and the Haxe SetText example, comparing them with the generated .json and the correctly rendered Blender Text object. Done means Russian text renders in the UI and does not produce the UTF-8 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender
Domain
game-dev, internationalization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.