Full Greek support and minor UI changes

Everything should now be translated in Greek. Will update if I have forgotten anything. Also made some changes to the layer and frame button colors and layer position.
This commit is contained in:
OverloadedOrama 2019-12-08 03:12:34 +02:00
parent d81d7ee5ef
commit bf4052ad84
13 changed files with 356 additions and 245 deletions

View file

@ -12,12 +12,12 @@ func _on_BrushButton_pressed() -> void:
if Global.current_left_tool == "Pencil":
Global.left_color_interpolation_container.visible = true
if hint_tooltip == "":
Global.left_brush_type_label.text = "Custom brush"
Global.left_brush_type_label.text = tr("Custom brush")
else:
Global.left_brush_type_label.text = "Brush: %s" % hint_tooltip
Global.left_brush_type_label.text = tr("Brush:") + " %s" % hint_tooltip
else: #Pixel brush
Global.left_color_interpolation_container.visible = false
Global.left_brush_type_label.text = "Brush: Pixel"
Global.left_brush_type_label.text = tr("Brush: Pixel")
Global.update_left_custom_brush()
@ -28,12 +28,12 @@ func _on_BrushButton_pressed() -> void:
if Global.current_right_tool == "Pencil":
Global.right_color_interpolation_container.visible = true
if hint_tooltip == "":
Global.right_brush_type_label.text = "Custom brush"
Global.right_brush_type_label.text = tr("Custom brush")
else:
Global.right_brush_type_label.text = "Brush: %s" % hint_tooltip
Global.right_brush_type_label.text = tr("Brush:") + " %s" % hint_tooltip
else: #Pixel brush
Global.right_color_interpolation_container.visible = false
Global.right_brush_type_label.text = "Brush: Pixel"
Global.right_brush_type_label.text = tr("Brush: Pixel")
Global.update_right_custom_brush()

View file

@ -319,7 +319,7 @@ func update_texture(layer_index : int, update_frame_tex := true) -> void:
layers[layer_index][1].create_from_image(layers[layer_index][0], 0)
var layer_container := get_layer_container(layer_index)
if layer_container:
layer_container.get_child(0).get_child(1).texture = layers[layer_index][1]
layer_container.get_child(1).get_child(0).texture = layers[layer_index][1]
if update_frame_tex:
#This code is used to update the texture in the animation timeline frame button
@ -440,9 +440,9 @@ func generate_layer_panels() -> void:
if !layers[i][2]:
layers[i][2] = "Layer %s" % i
layer_container.i = i
layer_container.get_child(0).get_child(1).texture = layers[i][1]
layer_container.get_child(0).get_child(2).text = layers[i][2]
layer_container.get_child(0).get_child(3).text = layers[i][2]
layer_container.get_child(1).get_child(0).texture = layers[i][1]
layer_container.get_child(1).get_child(1).text = layers[i][2]
layer_container.get_child(1).get_child(2).text = layers[i][2]
layers[i][3] = true #set visible
Global.vbox_layer_container.add_child(layer_container)

View file

@ -262,7 +262,7 @@ func find_node_by_name(root, node_name) -> Node:
func notification_label(text : String) -> void:
var notification : Label = load("res://Prefabs/NotificationLabel.tscn").instance()
notification.text = text
notification.text = tr(text)
notification.rect_position = Vector2(240, OS.window_size.y - 150)
get_tree().get_root().add_child(notification)
@ -347,7 +347,7 @@ func redo(_canvases : Array, layer_index : int = -1) -> void:
func frame_changed(value : int) -> void:
current_frame = value
current_frame_label.text = "Current frame: %s/%s" % [str(current_frame + 1), canvases.size()]
current_frame_label.text = tr("Current frame:") + " %s/%s" % [str(current_frame + 1), canvases.size()]
for c in canvases:
c.visible = false

View file

@ -5,7 +5,7 @@ var i
# warning-ignore:unused_class_variable
var currently_selected := false
onready var visibility_button := $HBoxContainer/VisibilityButton
onready var visibility_button := $VisibilityButton
onready var label := $HBoxContainer/Label
onready var line_edit := $HBoxContainer/LineEdit

View file

@ -126,19 +126,21 @@ func _ready() -> void:
#Options for Import
import_as_new_frame = CheckBox.new()
import_as_new_frame.text = "Import as new frame?"
import_as_new_frame.text = tr("IMPORT_FILE_LABEL")
$ImportSprites.get_vbox().add_child(import_as_new_frame)
#Options for Export
var export_project_hbox := HBoxContainer.new()
export_all_frames = CheckBox.new()
export_all_frames.text = "Export all frames?"
export_all_frames.text = tr("EXPORT_ALLFRAMES_LABEL")
export_as_single_file = CheckBox.new()
export_as_single_file.text = "Export frames as a single file?"
export_as_single_file.text = tr("EXPORT_FRAMES_ASFILE_LABEL")
export_vertical_spritesheet = CheckBox.new()
export_vertical_spritesheet.text = "Vertical spritesheet?"
$ExportSprites.get_vbox().add_child(export_all_frames)
$ExportSprites.get_vbox().add_child(export_as_single_file)
$ExportSprites.get_vbox().add_child(export_vertical_spritesheet)
export_vertical_spritesheet.text = tr("EXPORT_VERTICAL_SPRITESHEET_LABEL")
$ExportSprites.get_vbox().add_child(export_project_hbox)
export_project_hbox.add_child(export_all_frames)
export_project_hbox.add_child(export_as_single_file)
export_project_hbox.add_child(export_vertical_spritesheet)
var path := "Brushes"
var brushes_dir := Directory.new()
@ -938,9 +940,11 @@ func _on_SplitScreenButton_toggled(button_pressed) -> void:
if button_pressed:
Global.viewport_separator.visible = true
Global.second_viewport.visible = true
$SplitScreenButton.hint_tooltip = tr("SPLITSCREEN_HIDE_HT")
else:
Global.viewport_separator.visible = false
Global.second_viewport.visible = false
$SplitScreenButton.hint_tooltip = tr("SPLITSCREEN_HT")
func _on_ColorSwitch_pressed() -> void:
var temp := Global.left_color_picker.color