Skip to content

Commit 4ba4b8c

Browse files
#122 Adding TR attribute (+tests/docs)
Co-authored-by: mikenlanggio <mikendaikgiangho@gmail.com>
1 parent 5095829 commit 4ba4b8c

28 files changed

Lines changed: 608 additions & 30 deletions

Godot 4 Tests/Assets/tr/tr.csv

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
,_NOTES_,en,fr,de,jp
2+
,,,,,
3+
# Words,,,,,
4+
ENGLISH,(notes),English,,,
5+
FRENCH,(notes),Francias,,,
6+
HELLO,(notes),Hello,Bonjour,,
7+
,,,,,
8+
# Mixed,,,,,
9+
BURGERS,,I want to eat {0} hamburgers,Je veux manger {0} hamburgers,,
10+
SHAKES,, + {0} shakes, + {0} des shakes,,
11+
,,,,,
12+
# Combined,,,,,
13+
ALL_FOOD,,"I want to eat {0} ""hamburgers"" and {1} 'shakes'","Je veux manger {0} ""hamburgers"" and {1} des 'shakes'",,
14+
REVERSED,,"I want to eat {1} ""hamburgers"", and {0} 'shakes'","Je veux manger {1} ""hamburgers"", and {0} des 'shakes'",,
15+
,,,,,
16+
# Notes,,,,,
17+
#PLURALITY?,,,,,
18+
#ARG_MISMATCH,(uncomment to test),This has {0} arg,"this has {0} args, but should have {1}",,
777 Bytes
Binary file not shown.
902 Bytes
Binary file not shown.
929 Bytes
Binary file not shown.
777 Bytes
Binary file not shown.

Godot 4 Tests/Godot 4 Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414
<ItemGroup>
1515
<PackageReference Include="FluentAssertions" Version="[7.2.0]" />
16-
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.7.0-250928-2100.Release" />
16+
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.7.0-251001-1721.Release" />
1717
<ProjectReference Include="..\CustomGeneratorTests\CustomGeneratorTests.csproj" OutputItemType="analyzer" />
1818
</ItemGroup>
1919
</Project>

Godot 4 Tests/Run.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ private static IEnumerable<Func<ITest>> Tests
6262
yield return ITest.GetTest<ScriptForSceneWithDifferentPath>;
6363
yield return ITest.GetTest<SingletonAttributeTests>;
6464
yield return ITest.GetTest<SubNodeSceneTreeTest>;
65+
yield return ITest.GetTest<TranslationAttributeTests>;
6566
yield return ITest.GetTest<TraverseInstancedScene>;
6667
yield return ITest.GetTest<TscnFilePathTest>;
6768
yield return ITest.GetTest<TypeNameCaseMismatchTest>;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using Godot;
2+
3+
namespace GodotTests.TestScenes;
4+
5+
[SceneTree, Instantiable, Tool]
6+
public partial class TranslationAttributeTestScene : Node;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://bi1s420n5fylt
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[gd_scene load_steps=2 format=3 uid="uid://bw5icku87gae1"]
2+
3+
[ext_resource type="Script" uid="uid://bi1s420n5fylt" path="res://TestScenes/Feature122.TranslationAttributeTests/TranslationAttributeTestScene.cs" id="1_lmei6"]
4+
5+
[node name="Root" type="VBoxContainer"]
6+
anchors_preset = 8
7+
anchor_left = 0.5
8+
anchor_top = 0.5
9+
anchor_right = 0.5
10+
anchor_bottom = 0.5
11+
offset_left = -25.5
12+
offset_top = -25.0
13+
offset_right = 25.5
14+
offset_bottom = 25.0
15+
grow_horizontal = 2
16+
grow_vertical = 2
17+
script = ExtResource("1_lmei6")
18+
19+
[node name="Label1" type="Label" parent="."]
20+
unique_name_in_owner = true
21+
layout_mode = 2
22+
text = "ENGLISH"
23+
horizontal_alignment = 1
24+
vertical_alignment = 1
25+
26+
[node name="Label2" type="Label" parent="."]
27+
unique_name_in_owner = true
28+
layout_mode = 2
29+
text = "FRENCH"
30+
horizontal_alignment = 1
31+
vertical_alignment = 1
32+
33+
[node name="Label3" type="Label" parent="."]
34+
unique_name_in_owner = true
35+
layout_mode = 2
36+
text = "HELLO"
37+
horizontal_alignment = 1
38+
vertical_alignment = 1
39+
40+
[node name="Label4" type="Label" parent="."]
41+
unique_name_in_owner = true
42+
layout_mode = 2
43+
text = "ORDER"
44+
horizontal_alignment = 1
45+
vertical_alignment = 1
46+
47+
[node name="Label5" type="Label" parent="."]
48+
unique_name_in_owner = true
49+
layout_mode = 2
50+
text = "ALL_FOOD"
51+
horizontal_alignment = 1
52+
vertical_alignment = 1
53+
54+
[node name="Label6" type="Label" parent="."]
55+
unique_name_in_owner = true
56+
layout_mode = 2
57+
text = "REVERSED"
58+
horizontal_alignment = 1
59+
vertical_alignment = 1

0 commit comments

Comments
 (0)