From 8dc73c7d513d81f43bb10417309f3ccc2a7e943c Mon Sep 17 00:00:00 2001 From: Anish Mishra Date: Sun, 11 May 2025 21:50:18 +0530 Subject: [PATCH 1/2] Update from upstream --- .gitignore | 8 +- CONTRIBUTING.md | 2 +- assets/icons/Expand.svg | 1 + assets/icons/Expand.svg.import | 37 ++++ assets/icons/PresetGrayscale.svg | 2 +- godot_only/scripts/tests.gd | 3 +- godot_only/scripts/update_translations.gd | 19 ++ project.godot | 8 + src/autoload/HandlerGUI.gd | 26 +++ src/autoload/State.gd | 16 +- src/config_classes/Palette.gd | 10 +- src/config_classes/SVGHighlighter.gd | 5 + src/config_classes/SaveData.gd | 2 +- src/data_classes/AttributeColor.gd | 23 ++- src/data_classes/AttributePathdata.gd | 11 +- src/data_classes/AttributeTransformList.gd | 9 +- src/data_classes/ColorParser.gd | 11 +- src/data_classes/SVGParser.gd | 31 ++- src/ui_parts/code_editor.gd | 12 +- src/ui_parts/display.gd | 14 +- src/ui_parts/donate_menu.gd | 2 + src/ui_parts/donate_menu.tscn | 2 +- src/ui_parts/editor_scene.gd | 16 +- src/ui_parts/element_container.gd | 22 ++- src/ui_parts/export_menu.gd | 5 +- src/ui_parts/global_actions.gd | 5 +- src/ui_parts/good_file_dialog.gd | 15 +- src/ui_parts/good_file_dialog.tscn | 6 +- src/ui_parts/inspector.tscn | 1 - src/ui_parts/layout_popup.gd | 35 ++-- src/ui_parts/settings_menu.gd | 25 ++- src/ui_parts/tab_bar.gd | 20 +- src/ui_parts/update_menu.gd | 50 +++-- src/ui_parts/update_menu.tscn | 56 ++++-- src/ui_widgets/BetterLineEdit.gd | 1 + src/ui_widgets/BetterTextEdit.gd | 7 +- src/ui_widgets/ContextPopup.gd | 7 +- src/ui_widgets/color_edit.gd | 15 +- src/ui_widgets/color_edit_popup.gd | 19 ++ ...r_popup.gd.uid => color_edit_popup.gd.uid} | 0 ...icker_popup.tscn => color_edit_popup.tscn} | 4 +- src/ui_widgets/color_field.gd | 11 +- .../{color_popup.gd => color_field_popup.gd} | 4 +- ..._popup.gd.uid => color_field_popup.gd.uid} | 0 ...olor_popup.tscn => color_field_popup.tscn} | 24 +-- src/ui_widgets/color_picker_popup.gd | 25 --- src/ui_widgets/configure_color_popup.tscn | 1 - src/ui_widgets/element_frame.gd | 7 + src/ui_widgets/good_color_picker.gd | 100 +++++++--- src/ui_widgets/good_color_picker.tscn | 48 +---- src/ui_widgets/palette_config.gd | 14 +- src/ui_widgets/pathdata_field.gd | 4 +- src/ui_widgets/presented_shortcut.gd | 4 +- src/ui_widgets/setting_frame.gd | 1 - src/ui_widgets/setting_shortcut.gd | 36 +++- src/utils/FileUtils.gd | 27 ++- src/utils/ImageExportData.gd | 2 +- src/utils/ShortcutUtils.gd | 8 +- src/utils/ThemeUtils.gd | 84 ++++----- src/utils/TranslationUtils.gd | 23 +++ src/utils/Utils.gd | 5 + translations/GodSVG.pot | 93 +++++---- translations/bg.po | 127 +++++++------ translations/de.po | 168 ++++++++++------- translations/en.po | 93 +++++---- translations/et.po | 147 +++++++++------ translations/fr.po | 119 +++++++----- translations/nl.po | 119 +++++++----- translations/pt_BR.po | 116 ++++++++---- translations/ru.po | 151 ++++++++------- translations/uk.po | 176 ++++++++++-------- translations/zh_CN.po | 119 +++++++----- 72 files changed, 1485 insertions(+), 934 deletions(-) create mode 100644 assets/icons/Expand.svg create mode 100644 assets/icons/Expand.svg.import create mode 100644 src/ui_widgets/color_edit_popup.gd rename src/ui_widgets/{color_picker_popup.gd.uid => color_edit_popup.gd.uid} (100%) rename src/ui_widgets/{color_picker_popup.tscn => color_edit_popup.tscn} (80%) rename src/ui_widgets/{color_popup.gd => color_field_popup.gd} (99%) rename src/ui_widgets/{color_popup.gd.uid => color_field_popup.gd.uid} (100%) rename src/ui_widgets/{color_popup.tscn => color_field_popup.tscn} (80%) delete mode 100644 src/ui_widgets/color_picker_popup.gd diff --git a/.gitignore b/.gitignore index d1ac430..7c82308 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -# Godot 4+ specific ignores +# Godot-specific ignores .godot/ -.DS_Store +.nomedia -# Imported translations (automatically generated from CSV files) -*.translation +# Others .~lock.* +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1163015..e0b73d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Contributions don't need to be perfect, but they must move GodSVG in the right d GodSVG is made in Godot using its GDScript language. Refer to the [README](https://github.com/MewPurPur/GodSVG?tab=readme-ov-file#how-to-get-it) on how to get GodSVG running. -Git must be configured, then you can clone the repository to your local machine: `git clone git@github.com:MewPurPur/GodSVG.git` +Git must be configured, then you can clone the repository to your local machine: `git clone https://github.com/MewPurPur/GodSVG.git` The documentation won't go into detail about how to use Git. Refer to outside resources if you are unfamiliar with it. diff --git a/assets/icons/Expand.svg b/assets/icons/Expand.svg new file mode 100644 index 0000000..e53c7ff --- /dev/null +++ b/assets/icons/Expand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/Expand.svg.import b/assets/icons/Expand.svg.import new file mode 100644 index 0000000..faef64a --- /dev/null +++ b/assets/icons/Expand.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://0xptbhyrvsk1" +path="res://.godot/imported/Expand.svg-54a09277a628926ed67d8eb42ef8926e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/icons/Expand.svg" +dest_files=["res://.godot/imported/Expand.svg-54a09277a628926ed67d8eb42ef8926e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/assets/icons/PresetGrayscale.svg b/assets/icons/PresetGrayscale.svg index e52abba..f14673c 100644 --- a/assets/icons/PresetGrayscale.svg +++ b/assets/icons/PresetGrayscale.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/godot_only/scripts/tests.gd b/godot_only/scripts/tests.gd index 14e0045..46e1148 100644 --- a/godot_only/scripts/tests.gd +++ b/godot_only/scripts/tests.gd @@ -27,7 +27,8 @@ func pathdata_tests(print_success := false) -> bool: "M 0 0 z 2 3": [["M", 0.0, 0.0], ["z"]], "M3e1 4e-2": [["M", 3e1, 4e-2]], "M5,1 A4,4,0,1,1,5,9": [["M", 5.0, 1.0], ["A", 4.0, 4.0, 0.0, 1, 1, 5.0, 9.0]], - "M4 1 2 - 4 4z": [["M", 4.0, 1.0]] + "M4 1 2 - 4 4z": [["M", 4.0, 1.0]], + "M1 6.9e-1": [["M", 1.0, 0.69]], } var tests_passed := true diff --git a/godot_only/scripts/update_translations.gd b/godot_only/scripts/update_translations.gd index 06030ed..3947453 100644 --- a/godot_only/scripts/update_translations.gd +++ b/godot_only/scripts/update_translations.gd @@ -2,6 +2,17 @@ @tool extends EditorScript +const COMMENTS_DICT = { + "Viewport": "The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas.", + "CDATA color": "CDATA shouldn't be translated. It's a type of XML section.", + "Editor formatter": "Refers to the formatter used for GodSVG's code editor.", + "Export formatter": "Refers to the formatter used when exporting.", + "Handle colors": "Refers to the colors of the draggable handles.", + "Handle size": "Refers to the size of the draggable handles.", + "Excluded": "Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality.", + "Update check failed": "When checking for updates.", +} + const TRANSLATIONS_DIR = "translations" const HEADER = """#, fuzzy @@ -80,11 +91,15 @@ func search_directory(dir: String) -> void: func update_translations() -> void: + var used_comments := PackedStringArray() var location := ProjectSettings.globalize_path(TRANSLATIONS_DIR + "/GodSVG.pot") var fa := FileAccess.open(location, FileAccess.WRITE) fa.store_string(HEADER) for msg in messages: + if COMMENTS_DICT.has(msg.msgid): + fa.store_string("#. %s\n" % COMMENTS_DICT[msg.msgid]) + used_comments.append(msg.msgid) fa.store_string(msg.to_string()) fa = null print("Created " + TRANSLATIONS_DIR + "/GodSVG.pot with %d strings" % (messages.size() + 1)) @@ -105,3 +120,7 @@ func update_translations() -> void: print("Updated " + TRANSLATIONS_DIR + "/%s: %s" % [file, output[0].rstrip("\n")]) else: print("Updated " + TRANSLATIONS_DIR + "%s" % file) + + for id in COMMENTS_DICT: + if not used_comments.has(id): + print_rich("[color=#f66]The \"%s\" string, which has a comment defined for it, wasn't encountered." % id) diff --git a/project.godot b/project.godot index 3bf64ac..3aee4ec 100644 --- a/project.godot +++ b/project.godot @@ -336,11 +336,19 @@ toggle_snap={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":true,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) ] } +toggle_fullscreen={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194342,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":true,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} [input_devices] pointing/android/enable_long_press_as_right_click=true pointing/android/enable_pan_and_scale_gestures=true +pen_tablet/driver="dummy" +pen_tablet/driver.windows="dummy" [internationalization] diff --git a/src/autoload/HandlerGUI.gd b/src/autoload/HandlerGUI.gd index 05dd393..e8fd4f9 100644 --- a/src/autoload/HandlerGUI.gd +++ b/src/autoload/HandlerGUI.gd @@ -223,6 +223,7 @@ func _unhandled_input(event: InputEvent) -> void: if ShortcutUtils.is_action_pressed(event, action): match action: "quit": prompt_quit() + "toggle_fullscreen": toggle_fullscreen() "about_info": open_about() "about_donate": open_donate() "check_updates": open_update_checker() @@ -401,6 +402,31 @@ func prompt_quit() -> void: Translator.translate("Do you want to quit GodSVG?"), Translator.translate("Quit"), get_tree().quit) + +var was_window_maximized: bool +var window_old_rect: Rect2 + +func toggle_fullscreen() -> void: + if DisplayServer.window_get_mode() != DisplayServer.WindowMode.WINDOW_MODE_FULLSCREEN: + if DisplayServer.window_get_mode() == DisplayServer.WindowMode.WINDOW_MODE_MAXIMIZED: + was_window_maximized = true + else: + was_window_maximized = false + window_old_rect = Rect2(DisplayServer.window_get_position(), + DisplayServer.window_get_size()) + DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_FULLSCREEN) + else: + if was_window_maximized: + DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_MAXIMIZED) + else: + DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_WINDOWED) + DisplayServer.window_set_size(window_old_rect.size) + # TODO Without at least 3 frames of wait, on my laptop the window would + # sometimes go a little higher than before after setting its position. + for i in 3: + await get_tree().process_frame + DisplayServer.window_set_position(window_old_rect.position) + func open_update_checker() -> void: remove_all_menus() var confirmation_dialog := ConfirmDialogScene.instantiate() diff --git a/src/autoload/State.gd b/src/autoload/State.gd index 8894b29..91903c3 100644 --- a/src/autoload/State.gd +++ b/src/autoload/State.gd @@ -196,7 +196,7 @@ func get_export_text() -> String: signal hover_changed signal selection_changed -signal requested_scroll_to_element_editor(xid: PackedInt32Array, inner_idx: int) +signal requested_scroll_to_selection(xid: PackedInt32Array, inner_idx: int) # The viewport listens for this signal to put you in handle-placing mode. signal handle_added @@ -705,10 +705,10 @@ func _move_selected(down: bool) -> void: #xnode.get_attribute("d").move_subpath(inner_selections[0], down) queue_svg_save() -func view_in_list(xid: PackedInt32Array, inner_index := -1) -> void: +func view_in_inspector(xid: PackedInt32Array, inner_index := -1) -> void: if xid.is_empty(): return - requested_scroll_to_element_editor.emit(xid, inner_index) + requested_scroll_to_selection.emit(xid, inner_index) func duplicate_selected() -> void: root_element.duplicate_xnodes(selected_xids) @@ -761,7 +761,7 @@ func get_selection_context(popup_method: Callable, context: Utils.LayoutPart) -> can_move_down = true if context == Utils.LayoutPart.VIEWPORT: btn_arr.append(ContextPopup.create_button(Translator.translate("View in Inspector"), - view_in_list.bind(selected_xids[0]), false, + view_in_inspector.bind(selected_xids[0]), false, load("res://assets/icons/Inspector.svg"))) btn_arr.append(ContextPopup.create_shortcut_button("duplicate")) @@ -791,7 +791,7 @@ func get_selection_context(popup_method: Callable, context: Utils.LayoutPart) -> if idx < inner_idx: inner_idx = idx btn_arr.append(ContextPopup.create_button(Translator.translate("View in Inspector"), - view_in_list.bind(semi_selected_xid, inner_idx), false, + view_in_inspector.bind(semi_selected_xid, inner_idx), false, load("res://assets/icons/Inspector.svg"))) match element_ref.name: "path": @@ -886,8 +886,12 @@ func popup_insert_command_after_context(popup_method: Callable) -> void: # Disable invalid commands. Z is syntactically invalid, so disallow it even harder. var warned_commands: PackedStringArray var disabled_commands: PackedStringArray + # S commands are deliberately warned against in most cases, even though + # there is some sense in using them without a C or S command before them. + # Same for T commands in most cases, even though + # there is a notion of letting them determine the next shorthand quadratic curve. match cmd_char.to_upper(): - "M": warned_commands = PackedStringArray(["M", "Z", "T"]) + "M": warned_commands = PackedStringArray(["M", "Z", "S", "T"]) "L", "H", "V", "A": warned_commands = PackedStringArray(["S", "T"]) "C", "S": warned_commands = PackedStringArray(["T"]) "Q", "T": warned_commands = PackedStringArray(["S"]) diff --git a/src/config_classes/Palette.gd b/src/config_classes/Palette.gd index 38b8390..4b701f4 100644 --- a/src/config_classes/Palette.gd +++ b/src/config_classes/Palette.gd @@ -182,5 +182,11 @@ static func is_valid_palette(text: String) -> bool: var parser := XMLParser.new() parser.open_buffer(text.to_utf8_buffer()) parser.read() - return parser.get_node_type() == XMLParser.NODE_ELEMENT and\ - parser.get_node_name() == "palette" + while parser.read() == OK: + if parser.get_node_type() in [XMLParser.NODE_COMMENT, XMLParser.NODE_TEXT, + XMLParser.NODE_UNKNOWN]: + continue + + return parser.get_node_type() == XMLParser.NODE_ELEMENT and\ + parser.get_node_name() == "palette" + return false diff --git a/src/config_classes/SVGHighlighter.gd b/src/config_classes/SVGHighlighter.gd index e53a8c7..c8abfed 100644 --- a/src/config_classes/SVGHighlighter.gd +++ b/src/config_classes/SVGHighlighter.gd @@ -25,6 +25,11 @@ func _get_line_syntax_highlighting(line: int) -> Dictionary: if svg_text.is_empty(): return {} + # We only return a color map, so this should deal with non-ASCII. + for i in svg_text.length(): + if svg_text.unicode_at(i) >= 256: + svg_text[i] = "a" + var color_map: Dictionary[int, Dictionary] = {} var parser := XMLParser.new() parser.open_buffer(svg_text.to_utf8_buffer()) diff --git a/src/config_classes/SaveData.gd b/src/config_classes/SaveData.gd index add6355..4664f0a 100644 --- a/src/config_classes/SaveData.gd +++ b/src/config_classes/SaveData.gd @@ -16,7 +16,7 @@ func get_setting_default(setting: String) -> Variant: "highlighting_comment_color": return Color("cdcfd280") "highlighting_text_color": return Color("cdcfeaac") "highlighting_cdata_color": return Color("ffeda1ac") - "highlighting_error_color": return Color("ff866b") + "highlighting_error_color": return Color("ff5555") "handle_inner_color": return Color("fff") "handle_color": return Color("111") "handle_hovered_color": return Color("aaa") diff --git a/src/data_classes/AttributeColor.gd b/src/data_classes/AttributeColor.gd index cbae7e3..9dd3b14 100644 --- a/src/data_classes/AttributeColor.gd +++ b/src/data_classes/AttributeColor.gd @@ -18,8 +18,27 @@ func _format(text: String, formatter: Formatter) -> String: var named_colors_usage := formatter.color_use_named_colors # First make sure we have a 6-digit hex. - if ColorParser.is_valid_rgb(text) or ColorParser.is_valid_hsl(text): - text = "#" + ColorParser.text_to_color(text).to_html(false) + if ColorParser.is_valid_rgb(text): + var args_start_pos := text.find("(") + 1 + var inside_brackets := text.substr(args_start_pos, text.length() - args_start_pos - 1) + var args := inside_brackets.split(",", false) + var r := String.num_uint64(args[0].strip_edges(false, true).to_int(), 16) + var g := String.num_uint64(args[1].strip_edges(false, true).to_int(), 16) + var b := String.num_uint64(args[2].strip_edges(false, true).to_int(), 16) + text = "#" + (r if r.length() == 2 else "0" + r) +\ + (g if g.length() == 2 else "0" + g) + (b if b.length() == 2 else "0" + b) + elif ColorParser.is_valid_hsl(text): + var args_start_pos := text.find("(") + 1 + var inside_brackets := text.substr(args_start_pos, text.length() - args_start_pos - 1) + var args := inside_brackets.split(",", false) + var h := posmod(args[0].to_int(), 360) + var s := clampf(int(args[1].strip_edges(false, true).left(-1).to_float()) * 0.01, 0.0, 1.0) + var l := clampf(int(args[2].strip_edges(false, true).left(-1).to_float()) * 0.01, 0.0, 1.0) + var r := String.num_uint64(ColorParser.hsl_get_r(h, s, l), 16) + var g := String.num_uint64(ColorParser.hsl_get_g(h, s, l), 16) + var b := String.num_uint64(ColorParser.hsl_get_b(h, s, l), 16) + text = "#" + (r if r.length() == 2 else "0" + r) +\ + (g if g.length() == 2 else "0" + g) + (b if b.length() == 2 else "0" + b) if text in get_named_colors(): text = get_named_colors()[text] if ColorParser.is_valid_hex(text) and text.length() == 4: diff --git a/src/data_classes/AttributePathdata.gd b/src/data_classes/AttributePathdata.gd index e67cf3c..b64fe0c 100644 --- a/src/data_classes/AttributePathdata.gd +++ b/src/data_classes/AttributePathdata.gd @@ -249,7 +249,7 @@ static func pathdata_to_arrays(text: String) -> Array[Array]: var new_commands: Array[Array] = [] var curr_command := "" var prev_command := "" - var nums: Array[float] = [] + var nums: Array = [] # Not a float array because the arcs are ints. var args_left := 0 var comma_exhausted := false # Can ignore many whitespaces, but only one comma. @@ -366,12 +366,9 @@ static func pathdata_to_arrays(text: String) -> Array[Array]: comma_exhausted = true number_proceed = false "e", "E": - if passed_decimal_point: - return new_commands - else: - end_idx += 1 - idx += 1 - exponent_just_passed = true + end_idx += 1 + idx += 1 + exponent_just_passed = true _: if args_left >= 1 and\ not text.substr(start_idx, end_idx - start_idx).is_valid_float(): diff --git a/src/data_classes/AttributeTransformList.gd b/src/data_classes/AttributeTransformList.gd index d00e0c6..d71908f 100644 --- a/src/data_classes/AttributeTransformList.gd +++ b/src/data_classes/AttributeTransformList.gd @@ -173,12 +173,9 @@ static func text_to_transform_list(text: String) -> Array[Transform]: comma_exhausted = true number_proceed = false "e", "E": - if passed_decimal_point: - return [] - else: - end_idx += 1 - idx += 1 - exponent_just_passed = true + end_idx += 1 + idx += 1 + exponent_just_passed = true _: if not transform_params.substr( start_idx, end_idx - start_idx).is_valid_float(): diff --git a/src/data_classes/ColorParser.gd b/src/data_classes/ColorParser.gd index a39e9b5..f3107e2 100644 --- a/src/data_classes/ColorParser.gd +++ b/src/data_classes/ColorParser.gd @@ -99,7 +99,7 @@ static func is_valid_url(color: String) -> bool: static func _get_url_id(stripped_color: String) -> String: return stripped_color.substr(4, - stripped_color.length() - 5).strip_edges().trim_prefix("#") + stripped_color.length() - 5).strip_edges().right(-1) # URL doesn't have a color interpretation, so it'll give the backup. static func text_to_color(color: String, backup := Color.BLACK, @@ -109,9 +109,9 @@ allow_alpha := false) -> Color: return Color(AttributeColor.get_named_colors(allow_alpha)[color]) elif color == "none": return Color(0, 0, 0, 0) - elif is_valid_rgb(color, allow_alpha): - var inside_brackets := color.substr(4, color.length() - 5) + var args_start_pos := color.find("(") + 1 + var inside_brackets := color.substr(args_start_pos, color.length() - args_start_pos - 1) var args := inside_brackets.split(",", false) if not (args.size() == 3 or (args.size() == 4 and allow_alpha)): return backup @@ -131,7 +131,8 @@ allow_alpha := false) -> Color: return Color.from_rgba8(clampi(r, 0, 255), clampi(g, 0, 255), clampi(b, 0, 255), clampi(a, 0, 255)) elif is_valid_hsl(color, allow_alpha): - var inside_brackets := color.substr(4, color.length() - 5) + var args_start_pos := color.find("(") + 1 + var inside_brackets := color.substr(args_start_pos, color.length() - args_start_pos - 1) var args := inside_brackets.split(",", false) if not (args.size() == 3 or (args.size() == 4 and allow_alpha)): return backup @@ -213,4 +214,4 @@ static func hsl_get_b(h: int, s: float, l: float) -> int: static func decompose_hsl(n: int, h: int, s: float, l: float) -> int: var k := fmod(n + h/30.0, 12) var a := s * minf(l, 1 - l) - return int((l - a * maxf(-1, minf(minf(k - 3, 9 - k), 1))) * 255) + return roundi((l - a * maxf(-1, minf(minf(k - 3, 9 - k), 1))) * 255) diff --git a/src/data_classes/SVGParser.gd b/src/data_classes/SVGParser.gd index cbc8228..01dad10 100644 --- a/src/data_classes/SVGParser.gd +++ b/src/data_classes/SVGParser.gd @@ -5,8 +5,9 @@ static func text_check_is_root_empty(text: String) -> bool: if text.is_empty(): return false + var buffer := text.to_utf8_buffer() var parser := XMLParser.new() - parser.open_buffer(text.to_utf8_buffer()) + parser.open_buffer(buffer) # Ignore everything before the first svg tag. var describes_svg := false @@ -20,8 +21,8 @@ static func text_check_is_root_empty(text: String) -> bool: describes_svg = true var node_offset := parser.get_node_offset() - var closure_pos := text.find("/>", node_offset) - if closure_pos != -1 and closure_pos <= text.find(">", node_offset): + var closure_pos := _find_closure_string_in_utf8_buffer(buffer, node_offset) + if closure_pos != -1 and closure_pos <= buffer.find(">".unicode_at(0), node_offset): return true break @@ -204,9 +205,10 @@ static func text_to_root(text: String) -> ParseResult: if text.is_empty(): return ParseResult.new(ParseError.ERR_NOT_SVG) + var buffer := text.to_utf8_buffer() var root_element := ElementRoot.new() var parser := XMLParser.new() - parser.open_buffer(text.to_utf8_buffer()) + parser.open_buffer(buffer) var unclosed_element_stack: Array[Element] = [] # Ignore everything before the first SVG tag. @@ -225,8 +227,9 @@ static func text_to_root(text: String) -> ParseResult: parser.get_attribute_value(i)) var node_offset := parser.get_node_offset() - var closure_pos := text.find("/>", node_offset) - if closure_pos == -1 or closure_pos > text.find(">", node_offset): + + var closure_pos := _find_closure_string_in_utf8_buffer(buffer, node_offset) + if closure_pos == -1 or closure_pos > buffer.find(">".unicode_at(0), node_offset): unclosed_element_stack.append(root_element) break else: @@ -242,14 +245,14 @@ static func text_to_root(text: String) -> ParseResult: var element := DB.element(parser.get_node_name()) # Check if we're entering or exiting the element. var node_offset := parser.get_node_offset() - var closure_pos := text.find("/>", node_offset) + var closure_pos := _find_closure_string_in_utf8_buffer(buffer, node_offset) unclosed_element_stack.back().insert_child(-1, element) for i in parser.get_attribute_count(): element.set_attribute(parser.get_attribute_name(i), parser.get_attribute_value(i)) - if closure_pos == -1 or closure_pos > text.find(">", node_offset): + if closure_pos == -1 or closure_pos > buffer.find(">".unicode_at(0), node_offset): unclosed_element_stack.append(element) XMLParser.NODE_ELEMENT_END: @@ -283,3 +286,15 @@ static func text_to_root(text: String) -> ParseResult: return ParseResult.new(ParseError.ERR_IMPROPER_NESTING) return ParseResult.new(ParseError.OK, root_element) + + +# Helper to find "/>" strings inside a buffer. +static func _find_closure_string_in_utf8_buffer(buffer: PackedByteArray, offset: int) -> int: + while true: + offset = buffer.find("/".unicode_at(0), offset) + if offset == -1: + return -1 + elif buffer[offset + 1] == ">".unicode_at(0): + return offset + offset += 1 + return -1 diff --git a/src/ui_parts/code_editor.gd b/src/ui_parts/code_editor.gd index 6f5ec47..aacab65 100644 --- a/src/ui_parts/code_editor.gd +++ b/src/ui_parts/code_editor.gd @@ -73,18 +73,18 @@ func setup_theme() -> void: top_stylebox.border_width_bottom = 0 top_stylebox.corner_radius_bottom_right = 0 top_stylebox.corner_radius_bottom_left = 0 - top_stylebox.content_margin_left = 8 - top_stylebox.content_margin_right = 6 - top_stylebox.content_margin_top = 3 - top_stylebox.content_margin_bottom = 1 + top_stylebox.content_margin_left = 8.0 + top_stylebox.content_margin_right = 6.0 + top_stylebox.content_margin_top = 3.0 + top_stylebox.content_margin_bottom = 1.0 panel_container.add_theme_stylebox_override("panel", top_stylebox) # Set up the bottom panel. var bottom_stylebox := panel_stylebox.duplicate() bottom_stylebox.border_color = code_edit.get_theme_stylebox("normal").border_color bottom_stylebox.corner_radius_top_right = 0 bottom_stylebox.corner_radius_top_left = 0 - bottom_stylebox.content_margin_left = 10 - bottom_stylebox.content_margin_right = 8 + bottom_stylebox.content_margin_left = 10.0 + bottom_stylebox.content_margin_right = 8.0 bottom_stylebox.content_margin_top = -1 bottom_stylebox.content_margin_bottom = -1 error_bar.add_theme_stylebox_override("panel", bottom_stylebox) diff --git a/src/ui_parts/display.gd b/src/ui_parts/display.gd index d5eab21..c101ec6 100644 --- a/src/ui_parts/display.gd +++ b/src/ui_parts/display.gd @@ -22,9 +22,13 @@ func _ready() -> void: Configs.theme_changed.connect(update_theme) Configs.active_tab_changed.connect(sync_reference_image) Configs.active_tab_reference_changed.connect(sync_reference_image) + sync_reference_image() State.show_reference_changed.connect(_on_show_reference_updated) + _on_show_reference_updated() State.overlay_reference_changed.connect(_on_overlay_reference_updated) + _on_overlay_reference_updated() State.show_debug_changed.connect(_on_show_debug_changed) + _on_show_debug_changed() update_translations() update_theme() update_snap_config() @@ -46,8 +50,8 @@ func update_theme() -> void: frame.border_width_left = 2 frame.border_width_top = 2 frame.border_color = ThemeUtils.connected_button_border_color_pressed - frame.content_margin_left = 2 - frame.content_margin_top = 2 + frame.content_margin_left = 2.0 + frame.content_margin_top = 2.0 viewport_panel.add_theme_stylebox_override("panel", frame) func update_snap_config() -> void: @@ -61,6 +65,9 @@ func update_snap_config() -> void: func _on_reference_pressed() -> void: var btn_arr: Array[Button] = [ ContextPopup.create_shortcut_button("load_reference"), + ContextPopup.create_button(Translator.translate("Paste reference image"), + paste_reference_image, not Utils.has_clipboard_image_web_safe(), + load("res://assets/icons/Paste.svg")), ContextPopup.create_shortcut_checkbox("view_show_reference", reference_texture.visible), ContextPopup.create_shortcut_checkbox("view_overlay_reference", reference_overlay) ] @@ -70,6 +77,9 @@ func _on_reference_pressed() -> void: HandlerGUI.popup_under_rect_center(reference_popup, reference_button.get_global_rect(), get_viewport()) +func paste_reference_image() -> void: + FileUtils.load_reference_from_image(DisplayServer.clipboard_get_image()) + func _on_visuals_button_pressed() -> void: var btn_arr: Array[Button] = [ ContextPopup.create_shortcut_checkbox("view_show_grid", State.show_grid), diff --git a/src/ui_parts/donate_menu.gd b/src/ui_parts/donate_menu.gd index 2873bf3..37e41db 100644 --- a/src/ui_parts/donate_menu.gd +++ b/src/ui_parts/donate_menu.gd @@ -14,8 +14,10 @@ var current_link := Link.NONE @onready var ko_fi_link: Button = %MarginContainer/HBoxContainer/KoFiLink @onready var patreon_link: Button = %MarginContainer/HBoxContainer/PatreonLink @onready var hbox: HBoxContainer = %MarginContainer/HBoxContainer +@onready var title_label: Label = %TitleLabel func _ready() -> void: + title_label.text = Translator.translate("Links to donation platforms") close_button.text = Translator.translate("Cancel") close_button.pressed.connect(queue_free) set_link(Link.NONE) diff --git a/src/ui_parts/donate_menu.tscn b/src/ui_parts/donate_menu.tscn index aa69a7c..463c1aa 100644 --- a/src/ui_parts/donate_menu.tscn +++ b/src/ui_parts/donate_menu.tscn @@ -26,9 +26,9 @@ layout_mode = 2 theme_override_constants/separation = 4 [node name="TitleLabel" type="Label" parent="VBoxContainer"] +unique_name_in_owner = true layout_mode = 2 theme_override_font_sizes/font_size = 15 -text = "Links to donation platforms" horizontal_alignment = 1 [node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"] diff --git a/src/ui_parts/editor_scene.gd b/src/ui_parts/editor_scene.gd index 3e2bc96..f1a40fb 100644 --- a/src/ui_parts/editor_scene.gd +++ b/src/ui_parts/editor_scene.gd @@ -87,18 +87,24 @@ func update_layout() -> void: for i in layout_parts.size(): var part := layout_parts[i] var btn := Button.new() + # Make the text update when the language changes. + var set_btn_text_func := func() -> void: + btn.text = TranslationUtils.get_layout_part_name(part) + Configs.language_changed.connect(set_btn_text_func) + set_btn_text_func.call() + # Set up other button properties. btn.toggle_mode = true - btn.text = TranslationUtils.get_layout_part_name(part) btn.icon = Utils.get_layout_part_icon(part) btn.theme_type_variation = "FlatButton" btn.focus_mode = Control.FOCUS_NONE btn.action_mode = BaseButton.ACTION_MODE_BUTTON_PRESS btn.button_group = btn_group for node_part in layout_nodes: - if node_part == part: - btn.pressed.connect(layout_nodes[node_part].show) - else: - btn.pressed.connect(layout_nodes[node_part].hide) + btn.toggled.connect(func(_toggled_on: bool) -> void: + layout_nodes[node_part].visible = (node_part == part)) + if part == Utils.LayoutPart.INSPECTOR: + State.requested_scroll_to_selection.connect( + btn.set_pressed.bind(true).unbind(2)) buttons_hbox.add_child(btn) if i == 0: btn.button_pressed = true diff --git a/src/ui_parts/element_container.gd b/src/ui_parts/element_container.gd index 25ac3fc..996bbb8 100644 --- a/src/ui_parts/element_container.gd +++ b/src/ui_parts/element_container.gd @@ -9,7 +9,7 @@ const autoscroll_speed = 1500.0 @onready var covering_rect: Control = $MoveToOverlay func _ready() -> void: - State.requested_scroll_to_element_editor.connect(scroll_to_view_element_editor) + State.requested_scroll_to_selection.connect(scroll_to_view_element_editor) set_dragging(false) func set_dragging(new_state: bool) -> void: @@ -133,24 +133,28 @@ func get_xnode_editor_rect(xid: PackedInt32Array, inner_index := -1) -> Rect2: return Rect2() var xnode_editor: Control = xnodes.get_child(xid[0]) - for i in range(1, xid.size()): - xnode_editor = xnode_editor.child_xnodes_container.get_child(xid[i]) - if not is_instance_valid(xnode_editor): return Rect2() + for i in range(1, xid.size()): + xnode_editor = xnode_editor.get_xnode_editor(xid[i]) + if not is_instance_valid(xnode_editor): + return Rect2() - # Position relative to the element container. - var xid_position := Vector2(xnode_editor.global_position -\ + var xnode_pos := Vector2(xnode_editor.global_position -\ scroll_container.global_position) + Vector2(0, scroll_container.scroll_vertical) if inner_index == -1: - return Rect2(xid_position, xnode_editor.size) + return Rect2(xnode_pos, xnode_editor.size) else: var inner_rect: Rect2 = xnode_editor.get_inner_rect(inner_index) if\ State.root_element.get_xnode(xid).is_element() else Rect2() - return Rect2(xid_position + inner_rect.position, inner_rect.size) + return Rect2(xnode_pos + inner_rect.position, inner_rect.size) -# This function assumes there exists a element editor for the corresponding XID. +# This function assumes there exists an element editor for the corresponding XID. func scroll_to_view_element_editor(xid: PackedInt32Array, inner_idx := -1) -> void: + # Await the layout shift if inspector was not visible until now, or was resized + # since last being visible. + # TODO The frame delay is quite noticable and that's sad. Look for another solution. + await get_tree().process_frame scroll_container.get_v_scroll_bar().value =\ get_xnode_editor_rect(xid, inner_idx).position.y - scroll_container.size.y / 5 diff --git a/src/ui_parts/export_menu.gd b/src/ui_parts/export_menu.gd index 0594f4b..51081df 100644 --- a/src/ui_parts/export_menu.gd +++ b/src/ui_parts/export_menu.gd @@ -158,8 +158,9 @@ func update() -> void: lossless_checkbox.set_pressed_no_signal(not export_data.lossy) format_dropdown.set_value(export_data.format, false) - info_tooltip.visible = (export_data.format != "svg" and export_data.upscale_amount *\ - maxf(dimensions.x, dimensions.y) > texture_preview.MAX_IMAGE_DIMENSION) + info_tooltip.visible = (export_data.format != "svg" and\ + roundi(export_data.upscale_amount * maxf(dimensions.x, dimensions.y)) >\ + texture_preview.MAX_IMAGE_DIMENSION) func get_dimensions_text(sides: Vector2, integer := false) -> String: var precision := 0 if integer else 2 diff --git a/src/ui_parts/global_actions.gd b/src/ui_parts/global_actions.gd index 86eff15..16d3042 100644 --- a/src/ui_parts/global_actions.gd +++ b/src/ui_parts/global_actions.gd @@ -23,8 +23,8 @@ func _ready() -> void: const CONST_ARR: PackedStringArray = ["normal", "focus", "hover", "disabled"] for theme_type in CONST_ARR: var stylebox := size_button.get_theme_stylebox(theme_type).duplicate() - stylebox.content_margin_bottom = 0 - stylebox.content_margin_top = 0 + stylebox.content_margin_bottom = 0.0 + stylebox.content_margin_top = 0.0 size_button.add_theme_stylebox_override(theme_type, stylebox) size_button.end_bulk_theme_override() @@ -54,7 +54,6 @@ func _on_more_options_pressed() -> void: var about_btn := ContextPopup.create_shortcut_button("about_info", false, "", load("res://assets/logos/icon.svg")) - about_btn.expand_icon = true buttons_arr.append(about_btn) buttons_arr.append(ContextPopup.create_shortcut_button("about_repo")) var separator_indices := PackedInt32Array([1, 3]) diff --git a/src/ui_parts/good_file_dialog.gd b/src/ui_parts/good_file_dialog.gd index c20ea44..409076d 100644 --- a/src/ui_parts/good_file_dialog.gd +++ b/src/ui_parts/good_file_dialog.gd @@ -96,7 +96,7 @@ func _ready() -> void: file_container.hide() var extension_panel_stylebox := extension_panel.get_theme_stylebox("panel") - extension_panel_stylebox.content_margin_top -= 4 + extension_panel_stylebox.content_margin_top -= 4.0 extension_panel.add_theme_stylebox_override("panel", extension_panel_stylebox) if Configs.savedata.file_dialog_show_hidden: show_hidden_button.set_pressed_no_signal(true) @@ -107,16 +107,11 @@ func _ready() -> void: search_button.tooltip_text = Translator.translate("Search files") search_field.placeholder_text = Translator.translate("Search files") - if mode != FileMode.SELECT: - title_label.text = Translator.translate("Save SVG") + if mode == FileMode.SAVE: + title_label.text = TranslationUtils.get_file_dialog_save_mode_title_text(extensions[0]) extension_label.text = "." + extensions[0] else: - if extensions.size() == 1 and extensions[0] == "svg": - title_label.text = Translator.translate("Select an SVG") - elif extensions.size() == 1 and extensions[0] == "xml": - title_label.text = Translator.translate("Select an XML file") - else: - title_label.text = Translator.translate("Select an image") + title_label.text = TranslationUtils.get_file_dialog_select_mode_title_text(extensions) close_button.text = Translator.translate("Close") special_button.text = Translator.translate("Select") if\ @@ -447,7 +442,7 @@ func get_drive_icon(path: String) -> Texture2D: func _unhandled_input(event: InputEvent) -> void: if ShortcutUtils.is_action_pressed(event, "find"): - search_button.button_pressed = true + search_button.button_pressed = not search_button.button_pressed accept_event() elif event.is_action_pressed("ui_accept"): var selected_item_indices := file_list.get_selected_items() diff --git a/src/ui_parts/good_file_dialog.tscn b/src/ui_parts/good_file_dialog.tscn index 4c16503..f50ecab 100644 --- a/src/ui_parts/good_file_dialog.tscn +++ b/src/ui_parts/good_file_dialog.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://mp1nxm8i8tv8"] +[gd_scene load_steps=9 format=3 uid="uid://mp1nxm8i8tv8"] [ext_resource type="Script" uid="uid://cdlrqylqsmc22" path="res://src/ui_parts/good_file_dialog.gd" id="1_awdto"] [ext_resource type="Script" uid="uid://1hox6gd5pxku" path="res://src/ui_widgets/BetterLineEdit.gd" id="2_52puw"] @@ -7,6 +7,7 @@ [ext_resource type="Texture2D" uid="uid://kkxyv1gyrjgj" path="res://assets/icons/Visuals.svg" id="5_2ggtv"] [ext_resource type="Texture2D" uid="uid://d4c7haflm8evm" path="res://assets/icons/Search.svg" id="6_otods"] [ext_resource type="FontFile" uid="uid://clpf84p1lfwlp" path="res://assets/fonts/Font.ttf" id="7_eeq17"] +[ext_resource type="Script" uid="uid://ynx3s1jc6bwq" path="res://src/ui_widgets/BetterButton.gd" id="7_ejhg0"] [node name="GoodFileDialog" type="PanelContainer"] offset_right = 684.0 @@ -61,6 +62,9 @@ mouse_default_cursor_shape = 2 theme_type_variation = &"IconButton" toggle_mode = true icon = ExtResource("6_otods") +script = ExtResource("7_ejhg0") +action = "find" +metadata/_custom_type_script = "uid://ynx3s1jc6bwq" [node name="MainContainer" type="HBoxContainer" parent="VBoxContainer"] layout_mode = 2 diff --git a/src/ui_parts/inspector.tscn b/src/ui_parts/inspector.tscn index 8ed9057..c30079f 100644 --- a/src/ui_parts/inspector.tscn +++ b/src/ui_parts/inspector.tscn @@ -46,7 +46,6 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 size_flags_vertical = 3 -horizontal_scroll_mode = 0 [node name="MarginContainer" type="MarginContainer" parent="ElementContainer/ScrollContainer"] layout_mode = 2 diff --git a/src/ui_parts/layout_popup.gd b/src/ui_parts/layout_popup.gd index 4fd6bb4..a4e3104 100644 --- a/src/ui_parts/layout_popup.gd +++ b/src/ui_parts/layout_popup.gd @@ -236,6 +236,8 @@ func _can_drop_data(at_position: Vector2, data: Variant) -> bool: var top_left_parts := Configs.savedata.get_layout_parts(SaveData.LayoutLocation.TOP_LEFT) var bottom_left_parts := Configs.savedata.get_layout_parts(SaveData.LayoutLocation.BOTTOM_LEFT) + var is_dragged_part_the_only_top_left := (top_left_parts == [dragged_data.layout_part]) + var is_dragged_part_the_only_bottom_left := (bottom_left_parts == [dragged_data.layout_part]) for section in section_areas: var section_area := section_areas[section] @@ -244,12 +246,13 @@ func _can_drop_data(at_position: Vector2, data: Variant) -> bool: proposed_drop_location_pivot = section + if at_position.y < lerpf(section_area.position.y, section_area.end.y, 0.25) and\ ((section == SaveData.LayoutLocation.TOP_LEFT and\ - top_left_parts != [dragged_data.layout_part] and (bottom_left_parts.is_empty() or\ - bottom_left_parts == [dragged_data.layout_part])) or\ + not is_dragged_part_the_only_top_left and (bottom_left_parts.is_empty() or\ + is_dragged_part_the_only_bottom_left)) or\ (section == SaveData.LayoutLocation.BOTTOM_LEFT and top_left_parts.is_empty() and\ - bottom_left_parts != [dragged_data.layout_part])): + not is_dragged_part_the_only_top_left)): # Hovering over the top side of the section, when one of the following is true: # Case 1: The section is top left, and there's either nothing on the bottom left, # or the only thing on the bottom left is the dragged layout part. @@ -259,16 +262,16 @@ func _can_drop_data(at_position: Vector2, data: Variant) -> bool: proposed_drop_idx = -1 elif at_position.y > lerpf(section_area.position.y, section_area.end.y, 0.75) and\ ((section == SaveData.LayoutLocation.BOTTOM_LEFT and\ - bottom_left_parts != [dragged_data.layout_part] and (top_left_parts.is_empty() or\ - top_left_parts == [dragged_data.layout_part])) or\ + not is_dragged_part_the_only_bottom_left and (top_left_parts.is_empty() or\ + is_dragged_part_the_only_top_left)) or\ (section == SaveData.LayoutLocation.TOP_LEFT and bottom_left_parts.is_empty() and\ - top_left_parts != [dragged_data.layout_part])): + not is_dragged_part_the_only_bottom_left)): # Same logic as the previous big condition, but top and bottom are flipped. proposed_drop_location_direction = DropDirection.BELOW proposed_drop_idx = -1 elif not (section == SaveData.LayoutLocation.EXCLUDED and\ - ((top_left_parts == [dragged_data.layout_part] and bottom_left_parts.is_empty()) or\ - (bottom_left_parts == [dragged_data.layout_part] and top_left_parts.is_empty()))): + ((is_dragged_part_the_only_top_left and bottom_left_parts.is_empty()) or\ + (is_dragged_part_the_only_bottom_left and top_left_parts.is_empty()))): # Ensure we're not dragging the last layout part into excluded. proposed_drop_location_direction = DropDirection.INSIDE var layout_parts_count := Configs.savedata.get_layout_parts(section).size() @@ -307,6 +310,12 @@ func clear_proposed_drop() -> void: # Tooltips func _get_tooltip(at_position: Vector2) -> String: + # TODO Hack for the viewport tooltip. + var half_width := size.x / 2.0 - PANEL_MARGIN + if Rect2(size.x / 2.0, PANEL_MARGIN, half_width, half_width * 1.25).\ + grow(-BUFFER_SIZE).has_point(at_position): + return TranslationUtils.get_layout_part_name(Utils.LayoutPart.VIEWPORT) + for layout_part in layout_part_areas: if layout_part_areas[layout_part].grow(-BUFFER_SIZE).has_point(at_position): return TranslationUtils.get_layout_part_name(layout_part) @@ -320,11 +329,13 @@ func _make_custom_tooltip(for_text: String) -> Object: vbox.add_theme_constant_override("separation", 2) var main_label := Label.new() main_label.text = for_text - var dim_label := Label.new() - dim_label.add_theme_color_override("font_color", ThemeUtils.common_dimmer_text_color) - dim_label.text = Translator.translate("Drag and drop to change the layout") + # TODO The condition is a hack for the viewport tooltip. vbox.add_child(main_label) - vbox.add_child(dim_label) + if for_text != TranslationUtils.get_layout_part_name(Utils.LayoutPart.VIEWPORT): + var dim_label := Label.new() + dim_label.add_theme_color_override("font_color", ThemeUtils.common_dimmer_text_color) + dim_label.text = Translator.translate("Drag and drop to change the layout") + vbox.add_child(dim_label) return vbox diff --git a/src/ui_parts/settings_menu.gd b/src/ui_parts/settings_menu.gd index 2c7a486..913c9e6 100644 --- a/src/ui_parts/settings_menu.gd +++ b/src/ui_parts/settings_menu.gd @@ -198,6 +198,17 @@ func setup_content() -> void: add_color_edit(Translator.translate("Error color")) current_setup_setting = "basic_color_warning" add_color_edit(Translator.translate("Warning color")) + "tab_bar": + advice_panel.show() + create_setting_container() + content_container.add_child(setting_container) + current_setup_resource = Configs.savedata + + add_section(Translator.translate("Input")) + current_setup_setting = "tab_mmb_close" + add_checkbox(Translator.translate("Close tabs with middle mouse button")) + add_advice(Translator.translate( + "If turned on, clicking on a tab with the middle mouse button closes the tab. If turned off, it focuses the tab instead.")) "other": advice_panel.show() create_setting_container() @@ -216,7 +227,7 @@ func setup_content() -> void: current_setup_setting = "use_ctrl_for_zoom" add_checkbox(Translator.translate("Use CTRL for zooming")) add_advice(Translator.translate( - "If turned on, scrolling will pan the view. To zoom, hold CTRL while scrolling.")) + "If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling.")) add_section(Translator.translate("Miscellaneous")) current_setup_setting = "use_native_file_dialog" @@ -227,7 +238,7 @@ func setup_content() -> void: current_setup_setting = "use_filename_for_window_title" add_checkbox(Translator.translate("Sync window title to file name")) add_advice(Translator.translate( - "If turned off, the window title will remain simply \"GodSVG\" regardless of the current file.")) + "If turned off, the window title remains as \"GodSVG\" without including the current file.")) current_setup_setting = "handle_size" add_number_dropdown(Translator.translate("Handle size"), [0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0], false, false, @@ -331,16 +342,10 @@ func _on_language_pressed() -> void: var is_current_locale := (locale == TranslationServer.get_locale()) # Translation percentages. - # TODO Godot drove me insane here. So Translation.get_translated_message() gets - # all the translations, even the fuzzied ones that aren't used... whuh? - # So I tried to use Translation.get_message_list(), and it gets the messages - # for all the translations... except the fuzzied ones for some reason? WHAT?! - # We solve this by finding the number of fuzzied strings by subtracting the - # message count of English messages by the message count of the locale. if locale != "en": var translation_obj := TranslationServer.get_translation_object(locale) - var translated_count := 2 * translation_obj.get_message_count() -\ - strings_count - translation_obj.get_translated_message_list().count("") + var translated_count := translation_obj.get_message_count() -\ + translation_obj.get_translated_message_list().count("") btn_arr.append(ContextPopup.create_button( TranslationUtils.get_locale_display(locale), diff --git a/src/ui_parts/tab_bar.gd b/src/ui_parts/tab_bar.gd index 097bb0d..7824fb9 100644 --- a/src/ui_parts/tab_bar.gd +++ b/src/ui_parts/tab_bar.gd @@ -169,6 +169,8 @@ func _gui_input(event: InputEvent) -> void: scroll_to_active() else: # Give time for deferred callbacks that might change the active SVG. + # For example, the code editor might get unfocused by you clicking on + # a tab, changing the SVG, so this should be deferred. Configs.savedata.set_active_tab_index.call_deferred(hovered_idx) if event.button_index == MOUSE_BUTTON_LEFT: var scroll_backwards_area_rect := get_scroll_backwards_area_rect() @@ -220,6 +222,12 @@ func _gui_input(event: InputEvent) -> void: else: HandlerGUI.popup_under_pos(tab_popup, get_global_mouse_position(), get_viewport()) + elif event.button_index == MOUSE_BUTTON_MIDDLE: + if Configs.savedata.tab_mmb_close: + FileUtils.close_tabs(get_hovered_index()) + else: + # Refer to a previous comment for why it needs to be deferred. + Configs.savedata.set_active_tab_index.call_deferred(get_hovered_index()) elif event.button_index == MOUSE_BUTTON_LEFT and event.is_released(): scrolling_backwards = false scrolling_forwards = false @@ -422,10 +430,12 @@ func _make_custom_tooltip(for_text: String) -> Object: var path := for_text.left(asterisk_pos) var label := Label.new() - label.add_theme_font_override("font", ThemeUtils.mono_font if is_saved else ThemeUtils.regular_font) + label.add_theme_font_override("font", ThemeUtils.mono_font if is_saved\ + else ThemeUtils.regular_font) label.add_theme_font_size_override("font_size", 12) label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART - label.text = path if is_saved else Translator.translate("This SVG is not bound to a file location yet.") + label.text = path if is_saved else\ + Translator.translate("This SVG is not bound to a file location yet.") Utils.set_max_text_width(label, 192.0, 4.0) # If the tab is active, no need for an SVG preview. @@ -438,11 +448,11 @@ func _make_custom_tooltip(for_text: String) -> Object: var tooltip_panel_stylebox := get_theme_stylebox("panel", "TooltipPanel") margin_container.begin_bulk_theme_override() margin_container.add_theme_constant_override("margin_top", - int(8 - tooltip_panel_stylebox.content_margin_top)) + 8 - int(tooltip_panel_stylebox.content_margin_top)) margin_container.add_theme_constant_override("margin_bottom", - int(8 - tooltip_panel_stylebox.content_margin_bottom)) + 8 - int(tooltip_panel_stylebox.content_margin_bottom)) margin_container.add_theme_constant_override("margin_left", - int(8 - tooltip_panel_stylebox.content_margin_left)) + 8 - int(tooltip_panel_stylebox.content_margin_left)) margin_container.end_bulk_theme_override() var hbox := HBoxContainer.new() hbox.add_theme_constant_override("separation", 8) diff --git a/src/ui_parts/update_menu.gd b/src/ui_parts/update_menu.gd index c179300..8b174c6 100644 --- a/src/ui_parts/update_menu.gd +++ b/src/ui_parts/update_menu.gd @@ -1,10 +1,12 @@ extends PanelContainer @onready var http: HTTPRequest = $HTTPRequest -@onready var status_label: RichTextLabel = $VBoxContainer/Status +@onready var status_label: Label = %OverStatusContainer/StatusLabel +@onready var retry_button: Button = %OverStatusContainer/RetryButton +@onready var results_label: RichTextLabel = %Results +@onready var results_panel: PanelContainer = %ResultsPanel @onready var current_version_label: Label = $VBoxContainer/CurrentVersionLabel -@onready var prereleases_checkbox: CheckButton = $VBoxContainer/IncludePrereleases -@onready var retry_button: Button = $VBoxContainer/RetryButton +@onready var prereleases_button: CheckButton = $VBoxContainer/IncludePrereleases @onready var close_button: Button = $VBoxContainer/CloseButton var current_version: String = ProjectSettings.get_setting("application/config/version") @@ -12,14 +14,14 @@ var results: Dictionary[String, Array] = {} # version: [url, is_prerelease] func _ready() -> void: http.request_completed.connect(_on_request_completed) - retry_button.pressed.connect(_on_retry) - status_label.meta_clicked.connect(OS.shell_open) + retry_button.pressed.connect(request) + results_label.meta_clicked.connect(OS.shell_open) close_button.pressed.connect(queue_free) - prereleases_checkbox.toggled.connect(display_results.unbind(1)) + prereleases_button.toggled.connect(display_results.unbind(1)) close_button.text = Translator.translate("Close") - prereleases_checkbox.text = Translator.translate("Show prereleases") - retry_button.text = Translator.translate("Retry") + retry_button.tooltip_text = Translator.translate("Retry") + prereleases_button.text = Translator.translate("Show prereleases") current_version_label.text = Translator.translate("Current Version") + ": " +\ current_version request() @@ -53,10 +55,15 @@ _headers: PackedStringArray, body: PackedByteArray) -> void: release["created_at"]) var is_prerelease: bool = release["prerelease"] if is_prerelease: - prereleases_checkbox.disabled = false - prereleases_checkbox.set_pressed_no_signal(is_prerelease) + prereleases_button.disabled = false + prereleases_button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND + prereleases_button.set_pressed_no_signal(is_prerelease) break + if current_timestamp == -1: + display_error_message("Unable to compare versions") + return + for release: Dictionary in json: var creation_time: String = release["created_at"] var timestamp := Time.get_unix_time_from_datetime_string(creation_time) @@ -75,17 +82,16 @@ _headers: PackedStringArray, body: PackedByteArray) -> void: func display_error_message(msg: String) -> void: - status_label.text = Translator.translate("Update check failed") + ": %s" % msg + status_label.text = Translator.translate("Update check failed") + results_panel.show() + results_label.text = "%s\n[url=https://github.com/MewPurPur/GodSVG/releases]%s[/url]" %\ + [msg, Translator.translate("View all releases")] retry_button.show() -func _on_retry() -> void: - retry_button.hide() - request() - func display_results() -> void: # Check if there are results to be displayed. var has_results := false - if prereleases_checkbox.button_pressed: + if prereleases_button.button_pressed: has_results = not results.is_empty() else: for version in results: @@ -93,15 +99,19 @@ func display_results() -> void: has_results = true break # Set the text. + results_label.text = "" if not has_results: status_label.text = Translator.translate("GodSVG is up-to-date.") + results_panel.hide() return else: - status_label.text = Translator.translate("New versions") + ":" + status_label.text = Translator.translate("New versions available!") for version in results: var result := results[version] - if prereleases_checkbox.button_pressed or result[1] == false: + if prereleases_button.button_pressed or result[1] == false: if OS.has_feature("web"): - status_label.text += "\n%s" % version + results_label.text += version + "\n" else: - status_label.text += "\n[url=%s]%s[/url]" % [result[0], version] + results_label.text += "[url=%s]%s[/url]\n" % [result[0], version] + results_label.text = results_label.text.strip_edges() + results_panel.show() diff --git a/src/ui_parts/update_menu.tscn b/src/ui_parts/update_menu.tscn index 4e71962..a99fdf3 100644 --- a/src/ui_parts/update_menu.tscn +++ b/src/ui_parts/update_menu.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=3 uid="uid://dtyn8imbyo2rg"] +[gd_scene load_steps=3 format=3 uid="uid://dtyn8imbyo2rg"] [ext_resource type="Script" uid="uid://c6ca4ckjyrxg3" path="res://src/ui_parts/update_menu.gd" id="1_up0ed"] +[ext_resource type="Texture2D" uid="uid://cvh3kwbucf2n1" path="res://assets/icons/Reload.svg" id="2_x5og6"] [node name="UpdateMenu" type="PanelContainer"] custom_minimum_size = Vector2(300, 160) @@ -36,24 +37,57 @@ horizontal_alignment = 1 layout_mode = 2 size_flags_horizontal = 8 focus_mode = 0 -mouse_default_cursor_shape = 2 disabled = true -[node name="Status" type="RichTextLabel" parent="VBoxContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer"] layout_mode = 2 -size_flags_vertical = 3 -bbcode_enabled = true -fit_content = true -scroll_active = false -autowrap_mode = 0 -[node name="RetryButton" type="Button" parent="VBoxContainer"] +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 4 + +[node name="OverStatusContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/MarginContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(0, 24) +layout_mode = 2 + +[node name="StatusLabel" type="Label" parent="VBoxContainer/VBoxContainer/MarginContainer/OverStatusContainer"] +layout_mode = 2 + +[node name="RetryButton" type="Button" parent="VBoxContainer/VBoxContainer/MarginContainer/OverStatusContainer"] visible = false layout_mode = 2 -size_flags_horizontal = 0 -size_flags_vertical = 0 +size_flags_horizontal = 10 +size_flags_vertical = 4 focus_mode = 0 mouse_default_cursor_shape = 2 +theme_type_variation = &"IconButton" +icon = ExtResource("2_x5og6") + +[node name="ResultsControl" type="Control" parent="VBoxContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 44) +layout_mode = 2 + +[node name="ResultsPanel" type="PanelContainer" parent="VBoxContainer/VBoxContainer/ResultsControl"] +unique_name_in_owner = true +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/VBoxContainer/ResultsControl/ResultsPanel"] +layout_mode = 2 +theme_override_constants/margin_left = 4 + +[node name="Results" type="RichTextLabel" parent="VBoxContainer/VBoxContainer/ResultsControl/ResultsPanel/MarginContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(0, 38) +layout_mode = 2 +size_flags_vertical = 3 +bbcode_enabled = true [node name="CloseButton" type="Button" parent="VBoxContainer"] layout_mode = 2 diff --git a/src/ui_widgets/BetterLineEdit.gd b/src/ui_widgets/BetterLineEdit.gd index 189636a..3dffd25 100644 --- a/src/ui_widgets/BetterLineEdit.gd +++ b/src/ui_widgets/BetterLineEdit.gd @@ -106,6 +106,7 @@ func _gui_input(event: InputEvent) -> void: if event.is_action_pressed("ui_cancel"): release_focus() + accept_event() return mouse_filter = Utils.mouse_filter_pass_non_drag_events(event) diff --git a/src/ui_widgets/BetterTextEdit.gd b/src/ui_widgets/BetterTextEdit.gd index 914e820..65e6076 100644 --- a/src/ui_widgets/BetterTextEdit.gd +++ b/src/ui_widgets/BetterTextEdit.gd @@ -88,7 +88,12 @@ func _redraw_caret() -> void: # Determine the end of the caret and draw it. var caret_end := caret_pos if is_overtype_mode_enabled(): - caret_end.x += char_size.x + var char_width: float + if caret_column >= get_line(caret_line).length(): + char_width = char_size.x + else: + char_width = get_rect_at_line_column(caret_line, caret_column + 1).size.x + caret_end.x += char_width else: caret_end.y -= char_size.y + 1 RenderingServer.canvas_item_add_line(_surface, caret_pos, caret_end, caret_color, 1) diff --git a/src/ui_widgets/ContextPopup.gd b/src/ui_widgets/ContextPopup.gd index 3a5b141..23500b8 100644 --- a/src/ui_widgets/ContextPopup.gd +++ b/src/ui_widgets/ContextPopup.gd @@ -55,6 +55,7 @@ icon: Texture2D = null, dim_text := "") -> Button: var main_button := Button.new() main_button.text = text if is_instance_valid(icon): + main_button.add_theme_constant_override("icon_max_width", 16) main_button.icon = icon if not dim_text.is_empty(): @@ -242,9 +243,9 @@ min_width := -1.0, max_height := -1.0, separator_indices := PackedInt32Array()) var title_container := PanelContainer.new() var stylebox := StyleBoxFlat.new() stylebox.bg_color = Color("0003") - stylebox.content_margin_bottom = 3 - stylebox.content_margin_left = 8 - stylebox.content_margin_right = 8 + stylebox.content_margin_bottom = 3.0 + stylebox.content_margin_left = 8.0 + stylebox.content_margin_right = 8.0 stylebox.border_width_bottom = 2 stylebox.border_color = ThemeUtils.common_panel_border_color title_container.add_theme_stylebox_override("panel", stylebox) diff --git a/src/ui_widgets/color_edit.gd b/src/ui_widgets/color_edit.gd index 68bc22a..eabd864 100644 --- a/src/ui_widgets/color_edit.gd +++ b/src/ui_widgets/color_edit.gd @@ -1,13 +1,13 @@ # A color editor, not tied to any attribute. extends LineEditButton -const ColorPopupScene = preload("res://src/ui_widgets/color_popup.tscn") -const ColorPickerPopupScene = preload("res://src/ui_widgets/color_picker_popup.tscn") +const ColorEditPopup = preload("res://src/ui_widgets/color_edit_popup.gd") + +const ColorEditPopupScene = preload("res://src/ui_widgets/color_edit_popup.tscn") const checkerboard = preload("res://assets/icons/backgrounds/ColorButtonBG.svg") -@onready var color_picker: Control +var color_picker: ColorEditPopup -@export var enable_palettes := true @export var enable_alpha := false signal value_changed(new_value: String) @@ -38,8 +38,7 @@ func sync() -> void: queue_redraw() func _on_pressed() -> void: - color_picker = ColorPopupScene.instantiate() if enable_palettes\ - else ColorPickerPopupScene.instantiate() + color_picker = ColorEditPopupScene.instantiate() if enable_alpha: color_picker.enable_alpha = true color_picker.current_value = ColorParser.add_hash_if_hex(value) @@ -67,7 +66,5 @@ func _draw() -> void: else: draw_button_border("normal") -func _on_color_picked(new_color: String, close_picker: bool) -> void: +func _on_color_picked(new_color: String) -> void: value = new_color - if close_picker: - color_picker.queue_free() diff --git a/src/ui_widgets/color_edit_popup.gd b/src/ui_widgets/color_edit_popup.gd new file mode 100644 index 0000000..808e379 --- /dev/null +++ b/src/ui_widgets/color_edit_popup.gd @@ -0,0 +1,19 @@ +extends PanelContainer + +# The popup from color edits shouldn't access the palettes, so it's simpler. + +const GoodColorPickerScene = preload("res://src/ui_widgets/good_color_picker.tscn") + +@onready var margin_container: MarginContainer = $MarginContainer + +signal color_picked(new_color: String) +var enable_alpha := false +var current_value: String + +func _ready() -> void: + var color_picker := GoodColorPickerScene.instantiate() + color_picker.alpha_enabled = enable_alpha + margin_container.add_child(color_picker) + await get_tree().process_frame + color_picker.setup_color(current_value, Color.BLACK) + color_picker.color_changed.connect(color_picked.emit) diff --git a/src/ui_widgets/color_picker_popup.gd.uid b/src/ui_widgets/color_edit_popup.gd.uid similarity index 100% rename from src/ui_widgets/color_picker_popup.gd.uid rename to src/ui_widgets/color_edit_popup.gd.uid diff --git a/src/ui_widgets/color_picker_popup.tscn b/src/ui_widgets/color_edit_popup.tscn similarity index 80% rename from src/ui_widgets/color_picker_popup.tscn rename to src/ui_widgets/color_edit_popup.tscn index 3107636..d7a4446 100644 --- a/src/ui_widgets/color_picker_popup.tscn +++ b/src/ui_widgets/color_edit_popup.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=2 format=3 uid="uid://bs68u5annwepo"] -[ext_resource type="Script" uid="uid://6epc6l4yo18d" path="res://src/ui_widgets/color_picker_popup.gd" id="1_wmbff"] +[ext_resource type="Script" uid="uid://6epc6l4yo18d" path="res://src/ui_widgets/color_edit_popup.gd" id="1_wmbff"] -[node name="ColorPickerPopup" type="PanelContainer"] +[node name="ColorEditPopup" type="PanelContainer"] offset_right = 4.0 offset_bottom = 4.0 script = ExtResource("1_wmbff") diff --git a/src/ui_widgets/color_field.gd b/src/ui_widgets/color_field.gd index 132f09b..dd60379 100644 --- a/src/ui_widgets/color_field.gd +++ b/src/ui_widgets/color_field.gd @@ -1,7 +1,7 @@ # An editor to be tied to a color attribute. extends LineEditButton -const ColorPopup = preload("res://src/ui_widgets/color_popup.gd") +const ColorFieldPopup = preload("res://src/ui_widgets/color_field_popup.gd") var element: Element var attribute_name: String: # May propagate. @@ -15,11 +15,10 @@ var cached_allow_url: bool var cached_allow_none: bool var cached_allow_current_color: bool -const ColorPopupScene = preload("res://src/ui_widgets/color_popup.tscn") +const ColorFieldPopupScene = preload("res://src/ui_widgets/color_field_popup.tscn") const checkerboard = preload("res://assets/icons/backgrounds/ColorButtonBG.svg") -@onready var color_popup: ColorPopup - +var color_popup: ColorFieldPopup var gradient_texture: GradientTexture2D func set_value(new_value: String, save := false) -> void: @@ -76,7 +75,7 @@ func _on_svg_changed() -> void: queue_redraw() func _on_pressed() -> void: - color_popup = ColorPopupScene.instantiate() + color_popup = ColorFieldPopupScene.instantiate() color_popup.current_value = element.get_attribute_value(attribute_name) color_popup.effective_color = ColorParser.text_to_color( element.get_attribute_true_color(attribute_name)) @@ -155,8 +154,6 @@ func _draw() -> void: func _on_color_picked(new_color: String, close_picker: bool) -> void: set_value(new_color, close_picker) - if close_picker: - color_popup.queue_free() func is_valid(color_text: String) -> bool: return ColorParser.is_valid(ColorParser.add_hash_if_hex(color_text), false, diff --git a/src/ui_widgets/color_popup.gd b/src/ui_widgets/color_field_popup.gd similarity index 99% rename from src/ui_widgets/color_popup.gd rename to src/ui_widgets/color_field_popup.gd index 9079ae4..c28ed5f 100644 --- a/src/ui_widgets/color_popup.gd +++ b/src/ui_widgets/color_field_popup.gd @@ -61,8 +61,8 @@ func _ready() -> void: sb.corner_radius_top_right = 0 sb.corner_radius_bottom_left = 4 sb.corner_radius_bottom_right = 4 - sb.content_margin_bottom = 3 - sb.content_margin_top = 3 + sb.content_margin_bottom = 3.0 + sb.content_margin_top = 3.0 switch_mode_button.add_theme_stylebox_override(theme_type, sb) # Setup the rest. update_color_picker() diff --git a/src/ui_widgets/color_popup.gd.uid b/src/ui_widgets/color_field_popup.gd.uid similarity index 100% rename from src/ui_widgets/color_popup.gd.uid rename to src/ui_widgets/color_field_popup.gd.uid diff --git a/src/ui_widgets/color_popup.tscn b/src/ui_widgets/color_field_popup.tscn similarity index 80% rename from src/ui_widgets/color_popup.tscn rename to src/ui_widgets/color_field_popup.tscn index 4f48372..c76bc30 100644 --- a/src/ui_widgets/color_popup.tscn +++ b/src/ui_widgets/color_field_popup.tscn @@ -1,15 +1,15 @@ [gd_scene load_steps=5 format=3 uid="uid://f5cljfdpe85v"] -[ext_resource type="Script" uid="uid://caecf6gysjqel" path="res://src/ui_widgets/color_popup.gd" id="1_t1mgf"] -[ext_resource type="FontFile" uid="uid://clpf84p1lfwlp" path="res://assets/fonts/Font.ttf" id="2_5tod5"] -[ext_resource type="PackedScene" uid="uid://b1eig44cov474" path="res://src/ui_widgets/good_color_picker.tscn" id="2_jv3ea"] -[ext_resource type="Script" uid="uid://1hox6gd5pxku" path="res://src/ui_widgets/BetterLineEdit.gd" id="2_lkukd"] +[ext_resource type="Script" uid="uid://caecf6gysjqel" path="res://src/ui_widgets/color_field_popup.gd" id="1_xn1jy"] +[ext_resource type="FontFile" uid="uid://clpf84p1lfwlp" path="res://assets/fonts/Font.ttf" id="2_cds3l"] +[ext_resource type="Script" uid="uid://1hox6gd5pxku" path="res://src/ui_widgets/BetterLineEdit.gd" id="3_1h7ne"] +[ext_resource type="PackedScene" uid="uid://b1eig44cov474" path="res://src/ui_widgets/good_color_picker.tscn" id="4_0v7ma"] -[node name="ColorPopup" type="PanelContainer"] +[node name="ColorFieldPopup" type="PanelContainer"] custom_minimum_size = Vector2(160, 0) -offset_right = 218.0 -offset_bottom = 43.0 -script = ExtResource("1_t1mgf") +offset_right = 214.0 +offset_bottom = 325.0 +script = ExtResource("1_xn1jy") [node name="MainContainer" type="VBoxContainer" parent="."] layout_mode = 2 @@ -24,7 +24,7 @@ theme_override_constants/margin_right = 8 theme_override_constants/margin_bottom = 2 [node name="Palettes" type="ScrollContainer" parent="MainContainer/Content"] -custom_minimum_size = Vector2(0, 303) +custom_minimum_size = Vector2(0, 305) layout_mode = 2 horizontal_scroll_mode = 0 @@ -42,8 +42,8 @@ theme_override_constants/margin_right = 12 [node name="SearchField" type="LineEdit" parent="MainContainer/Content/Palettes/VBoxContainer/SearchBox"] layout_mode = 2 size_flags_horizontal = 3 -theme_override_fonts/font = ExtResource("2_5tod5") -script = ExtResource("2_lkukd") +theme_override_fonts/font = ExtResource("2_cds3l") +script = ExtResource("3_1h7ne") [node name="PalettesContent" type="VBoxContainer" parent="MainContainer/Content/Palettes/VBoxContainer"] unique_name_in_owner = true @@ -51,7 +51,7 @@ layout_mode = 2 size_flags_horizontal = 3 theme_override_constants/separation = 7 -[node name="ColorPicker" parent="MainContainer/Content" instance=ExtResource("2_jv3ea")] +[node name="ColorPicker" parent="MainContainer/Content" instance=ExtResource("4_0v7ma")] visible = false layout_mode = 2 diff --git a/src/ui_widgets/color_picker_popup.gd b/src/ui_widgets/color_picker_popup.gd deleted file mode 100644 index e97d213..0000000 --- a/src/ui_widgets/color_picker_popup.gd +++ /dev/null @@ -1,25 +0,0 @@ -extends PanelContainer - -const GoodColorPickerScene = preload("res://src/ui_widgets/good_color_picker.tscn") - -@onready var margin_container: MarginContainer = $MarginContainer - -signal color_picked(new_color: String, final: bool) -var enable_alpha := false -var is_none_keyword_available := false -var is_current_color_keyword_available := false -var current_value: String -var effective_color: Color - -func _ready() -> void: - var color_picker := GoodColorPickerScene.instantiate() - color_picker.alpha_enabled = enable_alpha - color_picker.is_none_keyword_available = is_none_keyword_available - color_picker.is_current_color_keyword_available = is_current_color_keyword_available - margin_container.add_child(color_picker) - await get_tree().process_frame - color_picker.setup_color(current_value, effective_color) - color_picker.color_changed.connect(pick_color) - -func pick_color(color: String) -> void: - color_picked.emit(color, false) diff --git a/src/ui_widgets/configure_color_popup.tscn b/src/ui_widgets/configure_color_popup.tscn index 4d56ffa..d98dbb5 100644 --- a/src/ui_widgets/configure_color_popup.tscn +++ b/src/ui_widgets/configure_color_popup.tscn @@ -60,7 +60,6 @@ alignment = 1 layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 4 -enable_palettes = false [node name="DeleteButton" type="Button" parent="ConfigureContainer/BottomContainer"] layout_mode = 2 diff --git a/src/ui_widgets/element_frame.gd b/src/ui_widgets/element_frame.gd index ca21f67..2f815f4 100644 --- a/src/ui_widgets/element_frame.gd +++ b/src/ui_widgets/element_frame.gd @@ -171,9 +171,16 @@ func _on_mouse_exited() -> void: determine_selection_highlight() +func get_xnode_editor(idx: int) -> Control: + return child_xnodes_container.get_child(idx) + +func get_xnodes_container_pos() -> Vector2: + return main_container.position + child_xnodes_container.position + func get_inner_rect(idx: int) -> Rect2: if element is ElementPath or element is ElementPolygon or element is ElementPolyline: var attributes_container := main_container.get_child(0) + # If there are unrecognized attributes their container will be the first child. for attribute in element.get_all_attributes(): if not DB.is_attribute_recognized(element.name, attribute.name): attributes_container = main_container.get_child(1) diff --git a/src/ui_widgets/good_color_picker.gd b/src/ui_widgets/good_color_picker.gd index 260a311..3f04c8c 100644 --- a/src/ui_widgets/good_color_picker.gd +++ b/src/ui_widgets/good_color_picker.gd @@ -11,35 +11,21 @@ var alpha_enabled := false var is_none_keyword_available := false var is_current_color_keyword_available := false +var color_space_button_group := ButtonGroup.new() + var undo_redo := UndoRedoRef.new() +signal slider_mode_changed enum SliderMode {RGB, HSV} var slider_mode: SliderMode: - set(new_mode): - slider_mode = new_mode - var disabled_button := hsv_button if new_mode == SliderMode.HSV else rgb_button - var arr: Array[Button] = [hsv_button, rgb_button] - for btn in arr: - btn.disabled = (btn == disabled_button) - btn.mouse_default_cursor_shape = Control.CURSOR_ARROW if\ - btn == disabled_button else Control.CURSOR_POINTING_HAND - match slider_mode: - SliderMode.RGB: - tracks_arr[1].material.set_shader_parameter("interpolation", 1) - tracks_arr[2].material.set_shader_parameter("interpolation", 2) - tracks_arr[3].material.set_shader_parameter("interpolation", 3) - SliderMode.HSV: - tracks_arr[1].material.set_shader_parameter("interpolation", 4) - tracks_arr[2].material.set_shader_parameter("interpolation", 5) - tracks_arr[3].material.set_shader_parameter("interpolation", 6) - if alpha_enabled: - tracks_arr[4].material.set_shader_parameter("interpolation", 0) - update() + set(new_value): + if slider_mode != new_value: + slider_mode = new_value + slider_mode_changed.emit() @onready var color_wheel: MarginContainer = $ShapeContainer/ColorWheel @onready var color_wheel_drawn: ColorRect = $ShapeContainer/ColorWheel/ColorWheelDraw -@onready var rgb_button: Button = $SliderContainer/ColorSpaceContainer/RGB -@onready var hsv_button: Button = $SliderContainer/ColorSpaceContainer/HSV +@onready var color_space_container: HBoxContainer = $SliderContainer/ColorSpaceContainer @onready var start_color_rect: Control = %ColorsDisplay/StartColorRect @onready var color_rect: Control = %ColorsDisplay/ColorRect @onready var keyword_button: Button = $ColorContainer/KeywordButton @@ -102,7 +88,47 @@ func setup_color(new_color: String, default_color: Color) -> void: slider_mode = Configs.savedata.color_picker_slider_mode update() -# Workaround to set up these values after ready. + +func add_color_space_buttons() -> void: + var normal_stylebox := StyleBoxFlat.new() + normal_stylebox.bg_color = ThemeUtils.translucent_button_color_normal + + var hover_stylebox := normal_stylebox.duplicate() + hover_stylebox.bg_color = ThemeUtils.translucent_button_color_hover + + var pressed_stylebox := StyleBoxFlat.new() + pressed_stylebox.bg_color = ThemeUtils.translucent_button_color_pressed + pressed_stylebox.border_width_top = 2 + pressed_stylebox.content_margin_bottom = 2.0 + pressed_stylebox.border_color = Color(ThemeUtils.common_editable_text_color, 0.7) + + for color_space: SliderMode in [SliderMode.RGB, SliderMode.HSV]: + var btn := Button.new() + btn.begin_bulk_theme_override() + btn.add_theme_constant_override("align_to_largest_stylebox", 0) + btn.add_theme_stylebox_override("normal", normal_stylebox) + btn.add_theme_stylebox_override("hover", hover_stylebox) + btn.add_theme_stylebox_override("pressed", pressed_stylebox) + btn.end_bulk_theme_override() + btn.size_flags_horizontal = Control.SIZE_EXPAND_FILL + btn.focus_mode = Control.FOCUS_NONE + btn.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND + btn.button_group = color_space_button_group + btn.toggle_mode = true + btn.action_mode = BaseButton.ACTION_MODE_BUTTON_PRESS + slider_mode_changed.connect(func() -> void: + btn.mouse_default_cursor_shape = Control.CURSOR_ARROW if\ + slider_mode == color_space else Control.CURSOR_POINTING_HAND + ) + if color_space == Configs.savedata.color_picker_slider_mode: + btn.button_pressed = true + btn.pressed.connect(change_slider_mode.bind(color_space)) + match color_space: + SliderMode.RGB: btn.text = "RGB" + SliderMode.HSV: btn.text = "HSV" + color_space_container.add_child(btn) + +# Workaround to set this after ready from external places. func update_keyword_button() -> void: if is_none_keyword_available or is_current_color_keyword_available: keyword_button.tooltip_text = Translator.translate("Color keywords") @@ -110,14 +136,18 @@ func update_keyword_button() -> void: keyword_button.show() func _ready() -> void: + add_color_space_buttons() # Set up signals. widgets_arr[0].gui_input.connect(parse_slider_input.bind(0, true)) widgets_arr[1].gui_input.connect(parse_slider_input.bind(1)) widgets_arr[2].gui_input.connect(parse_slider_input.bind(2)) widgets_arr[3].gui_input.connect(parse_slider_input.bind(3)) + slider_mode_changed.connect(_on_slider_mode_changed) + _on_slider_mode_changed() if alpha_enabled: alpha_slider.visible = alpha_enabled widgets_arr[4].gui_input.connect(parse_slider_input.bind(4)) + update_keyword_button() eyedropper_button.pressed.connect(_on_eyedropper_pressed) eyedropper_button.tooltip_text = Translator.translate("Eyedropper") @@ -128,6 +158,22 @@ func _ready() -> void: func _exit_tree() -> void: RenderingServer.free_rid(color_wheel_surface) + +func _on_slider_mode_changed() -> void: + match slider_mode: + SliderMode.RGB: + tracks_arr[1].material.set_shader_parameter("interpolation", 1) + tracks_arr[2].material.set_shader_parameter("interpolation", 2) + tracks_arr[3].material.set_shader_parameter("interpolation", 3) + SliderMode.HSV: + tracks_arr[1].material.set_shader_parameter("interpolation", 4) + tracks_arr[2].material.set_shader_parameter("interpolation", 5) + tracks_arr[3].material.set_shader_parameter("interpolation", 6) + if alpha_enabled: + tracks_arr[4].material.set_shader_parameter("interpolation", 0) + update() + + func register_visual_change(new_color: Color, use_backup := true) -> void: if use_backup and new_color == backup_display_color: return @@ -359,12 +405,6 @@ func _on_reset_color_button_pressed() -> void: undo_redo.commit_action() -func _on_rgb_pressed() -> void: - change_slider_mode(SliderMode.RGB) - -func _on_hsv_pressed() -> void: - change_slider_mode(SliderMode.HSV) - func change_slider_mode(new_slider_mode: SliderMode) -> void: slider_mode = new_slider_mode Configs.savedata.color_picker_slider_mode = new_slider_mode @@ -477,7 +517,7 @@ func hex(col: Color) -> String: return col.to_html(alpha_enabled and col.a != 1.0) -func _input(event: InputEvent) -> void: +func _unhandled_input(event: InputEvent) -> void: if not visible: return diff --git a/src/ui_widgets/good_color_picker.tscn b/src/ui_widgets/good_color_picker.tscn index 77885dd..60e83cc 100644 --- a/src/ui_widgets/good_color_picker.tscn +++ b/src/ui_widgets/good_color_picker.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=3 uid="uid://b1eig44cov474"] +[gd_scene load_steps=15 format=3 uid="uid://b1eig44cov474"] [ext_resource type="Script" uid="uid://bof1kkpsf7cmx" path="res://src/ui_widgets/good_color_picker.gd" id="1_0pc78"] [ext_resource type="Shader" uid="uid://dwop5cmg7i04p" path="res://src/shaders/color_wheel.gdshader" id="2_nf1uk"] @@ -20,22 +20,6 @@ shader_parameter/interpolation = 6 shader_parameter/horizontal = false shader_parameter/inverted = true -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sndty"] -bg_color = Color(0.866667, 0.933333, 1, 0.333333) -border_width_top = 2 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cle8x"] -content_margin_top = 1.0 -content_margin_bottom = 1.0 -bg_color = Color(0.866667, 0.933333, 1, 0.2) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mqx76"] -content_margin_top = 1.0 -content_margin_bottom = 1.0 -bg_color = Color(0.866667, 0.933333, 1, 0.133333) - -[sub_resource type="ButtonGroup" id="ButtonGroup_w0iiw"] - [sub_resource type="ShaderMaterial" id="ShaderMaterial_fvg6q"] shader = ExtResource("5_acxpg") shader_parameter/base_color = Vector4(1, 1, 1, 1) @@ -163,34 +147,6 @@ theme_override_constants/separation = 8 layout_mode = 2 size_flags_horizontal = 3 -[node name="RGB" type="Button" parent="SliderContainer/ColorSpaceContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -focus_mode = 0 -mouse_default_cursor_shape = 2 -theme_override_colors/font_disabled_color = Color(0.866667, 0.933333, 1, 1) -theme_override_styles/disabled = SubResource("StyleBoxFlat_sndty") -theme_override_styles/hover = SubResource("StyleBoxFlat_cle8x") -theme_override_styles/pressed = SubResource("StyleBoxFlat_sndty") -theme_override_styles/normal = SubResource("StyleBoxFlat_mqx76") -toggle_mode = true -button_group = SubResource("ButtonGroup_w0iiw") -text = "RGB" - -[node name="HSV" type="Button" parent="SliderContainer/ColorSpaceContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -focus_mode = 0 -mouse_default_cursor_shape = 2 -theme_override_colors/font_disabled_color = Color(0.866667, 0.933333, 1, 1) -theme_override_styles/disabled = SubResource("StyleBoxFlat_sndty") -theme_override_styles/hover = SubResource("StyleBoxFlat_cle8x") -theme_override_styles/pressed = SubResource("StyleBoxFlat_sndty") -theme_override_styles/normal = SubResource("StyleBoxFlat_mqx76") -toggle_mode = true -button_group = SubResource("ButtonGroup_w0iiw") -text = "HSV" - [node name="HBoxContainer" type="HBoxContainer" parent="SliderContainer"] layout_mode = 2 theme_override_constants/separation = 0 @@ -325,8 +281,6 @@ script = ExtResource("6_aqyoh") [connection signal="draw" from="ColorContainer/ColorsDisplay/StartColorRect" to="." method="_on_start_color_rect_draw"] [connection signal="draw" from="ColorContainer/ColorsDisplay/ColorRect" to="." method="_on_color_rect_draw"] [connection signal="pressed" from="ColorContainer/ColorsDisplay/ColorRect/ResetColorButton" to="." method="_on_reset_color_button_pressed"] -[connection signal="pressed" from="SliderContainer/ColorSpaceContainer/RGB" to="." method="_on_rgb_pressed"] -[connection signal="pressed" from="SliderContainer/ColorSpaceContainer/HSV" to="." method="_on_hsv_pressed"] [connection signal="draw" from="SliderContainer/HBoxContainer/TracksContainer/Slider1/MarginContainer" to="." method="_on_slider1_draw"] [connection signal="resized" from="SliderContainer/HBoxContainer/TracksContainer/Slider1/MarginContainer/ColorTrack" to="." method="_on_track_resized"] [connection signal="text_submitted" from="SliderContainer/HBoxContainer/TracksContainer/Slider1/IntField" to="." method="_on_slider1_text_submitted"] diff --git a/src/ui_widgets/palette_config.gd b/src/ui_widgets/palette_config.gd index 4dd67aa..2e3998f 100644 --- a/src/ui_widgets/palette_config.gd +++ b/src/ui_widgets/palette_config.gd @@ -21,9 +21,9 @@ func setup_theme() -> void: const CONST_ARR: PackedStringArray = ["normal", "hover", "pressed"] for theme_type in CONST_ARR: var stylebox := palette_button.get_theme_stylebox(theme_type).duplicate() - stylebox.content_margin_top -= 3 - stylebox.content_margin_bottom -= 2 - stylebox.content_margin_left += 1 + stylebox.content_margin_top -= 3.0 + stylebox.content_margin_bottom -= 2.0 + stylebox.content_margin_left += 1.0 palette_button.add_theme_stylebox_override(theme_type, stylebox) palette_button.end_bulk_theme_override() var panel_stylebox := get_theme_stylebox("panel").duplicate() @@ -122,9 +122,13 @@ func _on_name_edit_text_changed(new_text: String) -> void: name_edit.begin_bulk_theme_override() const CONST_ARR: PackedStringArray = ["font_color", "font_hover_color"] for theme_type in CONST_ARR: + # If the new text matches the current title, show warning color + # if the palette is currently invalid. If the new text is different, + # check if it's unused, i.e., would be a valid title. name_edit.add_theme_color_override(theme_type, - Configs.savedata.get_validity_color(false, new_text != palette.title and\ - not Configs.savedata.is_palette_title_unused(new_text))) + Configs.savedata.get_validity_color(false, (new_text != palette.title and\ + not Configs.savedata.is_palette_title_unused(new_text)) or\ + (new_text == palette.title and Configs.savedata.is_palette_valid(palette)))) name_edit.end_bulk_theme_override() func _on_name_edit_text_submitted(new_title: String) -> void: diff --git a/src/ui_widgets/pathdata_field.gd b/src/ui_widgets/pathdata_field.gd index ad2f157..8d00885 100644 --- a/src/ui_widgets/pathdata_field.gd +++ b/src/ui_widgets/pathdata_field.gd @@ -223,8 +223,8 @@ func _on_commands_gui_input(event: InputEvent) -> void: var viewport := get_viewport() var popup_pos := viewport.get_mouse_position() HandlerGUI.popup_under_pos(State.get_selection_context( - HandlerGUI.popup_under_pos.bind(popup_pos, viewport), State.Context.LIST), - popup_pos, viewport) + HandlerGUI.popup_under_pos.bind(popup_pos, viewport), + Utils.LayoutPart.INSPECTOR), popup_pos, viewport) func _commands_draw() -> void: diff --git a/src/ui_widgets/presented_shortcut.gd b/src/ui_widgets/presented_shortcut.gd index 45f5f57..3f30f73 100644 --- a/src/ui_widgets/presented_shortcut.gd +++ b/src/ui_widgets/presented_shortcut.gd @@ -18,8 +18,8 @@ func setup(new_action: String) -> void: new_btn.size_flags_horizontal = Control.SIZE_FILL new_btn.theme_type_variation = "TranslucentButton" var shortcut_stylebox := get_theme_stylebox("disabled", "TranslucentButton").duplicate() - shortcut_stylebox.content_margin_top = 0 - shortcut_stylebox.content_margin_bottom = 0 + shortcut_stylebox.content_margin_top = 0.0 + shortcut_stylebox.content_margin_bottom = 0.0 new_btn.add_theme_stylebox_override("disabled", shortcut_stylebox) new_btn.focus_mode = Control.FOCUS_NONE diff --git a/src/ui_widgets/setting_frame.gd b/src/ui_widgets/setting_frame.gd index afeb8e8..e65146e 100644 --- a/src/ui_widgets/setting_frame.gd +++ b/src/ui_widgets/setting_frame.gd @@ -49,7 +49,6 @@ func setup_checkbox() -> void: func setup_color(enable_alpha: bool) -> void: widget = ColorEditScene.instantiate() widget.enable_alpha = enable_alpha - widget.enable_palettes = false widget.value = getter.call().to_html(enable_alpha) add_child(widget) widget.value_changed.connect(_color_modification.bind(enable_alpha)) diff --git a/src/ui_widgets/setting_shortcut.gd b/src/ui_widgets/setting_shortcut.gd index 5d90d6e..fc9d89f 100644 --- a/src/ui_widgets/setting_shortcut.gd +++ b/src/ui_widgets/setting_shortcut.gd @@ -56,8 +56,8 @@ func sync() -> void: for theme_type in CONST_ARR: var shortcut_stylebox := get_theme_stylebox(theme_type, "TranslucentButton").duplicate() - shortcut_stylebox.content_margin_top = 0 - shortcut_stylebox.content_margin_bottom = 0 + shortcut_stylebox.content_margin_top = 0.0 + shortcut_stylebox.content_margin_bottom = 0.0 new_btn.add_theme_stylebox_override(theme_type, shortcut_stylebox) new_btn.end_bulk_theme_override() @@ -97,14 +97,29 @@ func enter_listening_mode(idx: int, show_delete_button := false) -> void: btn.pressed.connect(cancel_listening) btn.focus_exited.connect(cancel_listening) # Workaround to show the keys pressed at the time of clicking. - var activation_event := InputEventKey.new() - activation_event.pressed = true - activation_event.ctrl_pressed = Input.is_key_pressed(KEY_CTRL) - activation_event.shift_pressed = Input.is_key_pressed(KEY_SHIFT) - activation_event.alt_pressed = Input.is_key_pressed(KEY_ALT) - set_shortcut_button_text(btn, activation_event.as_text_keycode().\ - trim_suffix("(Unset)").trim_suffix("+")) - if btn.text.is_empty(): + var is_shift_pressed := Input.is_key_pressed(KEY_SHIFT) + var is_alt_pressed := Input.is_key_pressed(KEY_ALT) + var is_ctrl_pressed := Input.is_key_pressed(KEY_CTRL) + var is_meta_pressed := Input.is_key_pressed(KEY_META) + if is_shift_pressed or is_alt_pressed or is_ctrl_pressed or is_meta_pressed: + var activation_event := InputEventKey.new() + activation_event.pressed = true + # Need to pretend that one of the keys was pressed last. It doesn't matter which. + if is_shift_pressed: + activation_event.keycode = KEY_SHIFT + activation_event.command_or_control_autoremap = is_ctrl_pressed or is_meta_pressed + activation_event.alt_pressed = is_alt_pressed + elif is_alt_pressed: + activation_event.keycode = KEY_ALT + activation_event.command_or_control_autoremap = is_ctrl_pressed or is_meta_pressed + elif is_ctrl_pressed: + activation_event.keycode = KEY_CTRL + elif is_meta_pressed: + activation_event.keycode = KEY_META + + set_shortcut_button_text(btn, activation_event.as_text_keycode()) + pending_event = activation_event + else: set_shortcut_button_text(btn, Translator.translate("Press keys…")) # Add optional delete button. if show_delete_button: @@ -196,6 +211,7 @@ func setup_shortcut_button_font_colors(button: Button, color: Color) -> void: button.end_bulk_theme_override() func set_shortcut_button_text(button: Button, new_text: String) -> void: + # Make the font smaller for long shortcuts. button.remove_theme_font_size_override("font_size") while button.get_theme_font("font").get_string_size(new_text, HORIZONTAL_ALIGNMENT_LEFT, -1, button.get_theme_font_size("font_size")).x > button.custom_minimum_size.x: diff --git a/src/utils/FileUtils.gd b/src/utils/FileUtils.gd index c903224..3f27580 100644 --- a/src/utils/FileUtils.gd +++ b/src/utils/FileUtils.gd @@ -57,7 +57,7 @@ static func open_export_dialog(export_data: ImageExportData, final_callback := C buffer = ImageExportData.svg_to_buffer() else: buffer = export_data.image_to_buffer(export_data.generate_image()) - _web_save(buffer, ImageExportData.web_formats[export_data.format]) + _web_save(buffer, ImageExportData.image_types_dict[export_data.format]) if final_callback.is_valid(): final_callback.call() else: @@ -70,8 +70,8 @@ static func open_export_dialog(export_data: ImageExportData, final_callback := C final_callback.call() DisplayServer.file_dialog_show( - Translator.translate("Save the .\"{format}\" file").format( - {"format": export_data.format}), Configs.savedata.get_active_tab_dir(), + TranslationUtils.get_file_dialog_save_mode_title_text(export_data.format), + Configs.savedata.get_active_tab_dir(), _choose_file_name() + "." + export_data.format, false, DisplayServer.FILE_DIALOG_MODE_SAVE_FILE, PackedStringArray(["*." + export_data.format]), native_callback) @@ -101,8 +101,8 @@ static func open_xml_export_dialog(xml: String, file_name: String) -> void: _finish_xml_export(files[0], xml) DisplayServer.file_dialog_show( - Translator.translate("Save the .\"{format}\" file").format( - {"format": "xml"}), Configs.savedata.get_last_dir(), + TranslationUtils.get_file_dialog_save_mode_title_text("xml"), + Configs.savedata.get_last_dir(), file_name + ".xml", false, DisplayServer.FILE_DIALOG_MODE_SAVE_FILE, PackedStringArray(["*.xml"]), native_callback) else: @@ -147,8 +147,10 @@ static func _finish_reference_load(data: Variant, file_path: String) -> void: "png": img.load_png_from_buffer(data) "jpg", "jpeg": img.load_jpg_from_buffer(data) "webp": img.load_webp_from_buffer(data) - var image_texture := ImageTexture.create_from_image(img) - Configs.savedata.get_active_tab().reference_image = image_texture + load_reference_from_image(img) + +static func load_reference_from_image(img: Image) -> void: + Configs.savedata.get_active_tab().reference_image = ImageTexture.create_from_image(img) static func _is_native_preferred() -> bool: @@ -165,24 +167,20 @@ static func open_svg_import_dialog() -> void: static func open_image_import_dialog() -> void: _open_import_dialog(PackedStringArray(["png", "jpg", "jpeg", "webp", "svg"]), - _finish_reference_load, Translator.translate("Load an image file")) + _finish_reference_load) static func open_xml_import_dialog(completion_callback: Callable) -> void: _open_import_dialog(PackedStringArray(["xml"]), completion_callback) # On web, the completion callback can't use the full file path, static func _open_import_dialog(extensions: PackedStringArray, -completion_callback: Callable, native_dialog_title := "") -> void: +completion_callback: Callable) -> void: if not OS.request_permissions(): return var extensions_with_dots := PackedStringArray() for extension in extensions: extensions_with_dots.append("." + extension) - if native_dialog_title.is_empty(): - native_dialog_title = Translator.translate("Import a {extension} file").format( - {"extension": " / ".join(extensions_with_dots)}) - if OS.has_feature("web"): _web_load_file(extensions, completion_callback) else: @@ -196,7 +194,8 @@ completion_callback: Callable, native_dialog_title := "") -> void: if has_selected: _finish_file_import(files[0], completion_callback, extensions) - DisplayServer.file_dialog_show(native_dialog_title, + DisplayServer.file_dialog_show( + TranslationUtils.get_file_dialog_select_mode_title_text(extensions), Configs.savedata.get_last_dir(), "", false, DisplayServer.FILE_DIALOG_MODE_OPEN_FILE, filters, native_callback) else: diff --git a/src/utils/ImageExportData.gd b/src/utils/ImageExportData.gd index 1f8343f..dc24b64 100644 --- a/src/utils/ImageExportData.gd +++ b/src/utils/ImageExportData.gd @@ -1,6 +1,6 @@ class_name ImageExportData extends RefCounted -const web_formats: Dictionary[String, String] = { +const image_types_dict: Dictionary[String, String] = { "svg": "image/svg+xml", "png": "image/png", "jpg": "image/jpeg", diff --git a/src/utils/ShortcutUtils.gd b/src/utils/ShortcutUtils.gd index 2e6b4da..84e4c0a 100644 --- a/src/utils/ShortcutUtils.gd +++ b/src/utils/ShortcutUtils.gd @@ -1,9 +1,9 @@ class_name ShortcutUtils extends RefCounted # Can be activated in all contexts. -const UNIVERSAL_ACTIONS: PackedStringArray = ["quit", "about_info", "about_donate", - "check_updates", "open_settings", "about_repo", "about_website", "open_externally", - "open_in_folder"] +const UNIVERSAL_ACTIONS: PackedStringArray = ["quit", "toggle_fullscreen", "about_info", + "about_donate", "check_updates", "open_settings", "about_repo", "about_website", + "open_externally", "open_in_folder"] # Requires there being no dialogs. const EFFECT_ACTIONS: PackedStringArray = ["view_show_grid", "view_show_handles", @@ -58,6 +58,7 @@ const _action_categories_dict: Dictionary[String, Dictionary] = { "zoom_in": true, "zoom_out": true, "zoom_reset": true, + "toggle_fullscreen": true, "debug": false, "view_show_grid": true, "view_show_handles": true, @@ -128,6 +129,7 @@ static func get_action_icon(action: String) -> Texture2D: "open_settings": return load("res://assets/icons/Gear.svg") "about_donate": return load("res://assets/icons/Heart.svg") "about_repo", "about_website": return load("res://assets/icons/Link.svg") + "toggle_fullscreen": return load("res://assets/icons/Expand.svg") "load_reference": return load("res://assets/icons/Reference.svg") _: return load("res://assets/icons/Placeholder.svg") diff --git a/src/utils/ThemeUtils.gd b/src/utils/ThemeUtils.gd index a82a58e..89ccdad 100644 --- a/src/utils/ThemeUtils.gd +++ b/src/utils/ThemeUtils.gd @@ -10,7 +10,6 @@ const common_panel_border_color = Color("414159") const common_caret_color = Color("ddeeffdd") const common_selection_color = Color("668cff66") const common_disabled_selection_color = Color("aaaaaa66") -const common_editable_text_color = Color("ddeeff") const common_inner_color_disabled = Color("0e0e12") const common_border_color_disabled = Color("1e1f24") @@ -19,6 +18,7 @@ const common_highlighted_text_color = Color("ffffff") const common_dim_text_color = Color("ffffffbb") const common_dimmer_text_color = Color("ffffff77") const common_subtle_text_color = Color("ffffff55") +const common_editable_text_color = Color("ddeeff") const common_button_inner_color_normal = Color("1c1e38") const common_button_border_color_normal = Color("313859") @@ -453,16 +453,16 @@ static func _setup_button(theme: Theme) -> void: theme.set_color("icon_pressed_color", "ContextButton", icon_hover_color) var context_button_stylebox := StyleBoxFlat.new() context_button_stylebox.set_corner_radius_all(3) - context_button_stylebox.content_margin_bottom = 2 - context_button_stylebox.content_margin_top = 2 - context_button_stylebox.content_margin_left = 3 - context_button_stylebox.content_margin_right = 4 + context_button_stylebox.content_margin_bottom = 2.0 + context_button_stylebox.content_margin_top = 2.0 + context_button_stylebox.content_margin_left = 3.0 + context_button_stylebox.content_margin_right = 4.0 var normal_context_button_stylebox := StyleBoxEmpty.new() - normal_context_button_stylebox.content_margin_bottom = 2 - normal_context_button_stylebox.content_margin_top = 2 - normal_context_button_stylebox.content_margin_left = 3 - normal_context_button_stylebox.content_margin_right = 4 + normal_context_button_stylebox.content_margin_bottom = 2.0 + normal_context_button_stylebox.content_margin_top = 2.0 + normal_context_button_stylebox.content_margin_left = 3.0 + normal_context_button_stylebox.content_margin_right = 4.0 theme.set_stylebox("normal", "ContextButton", normal_context_button_stylebox) var hover_context_button_stylebox := context_button_stylebox.duplicate() @@ -501,10 +501,10 @@ static func _setup_button(theme: Theme) -> void: normal_sidetab_stylebox.bg_color = normal_tab_color normal_sidetab_stylebox.corner_radius_top_left = 4 normal_sidetab_stylebox.corner_radius_bottom_left = 4 - normal_sidetab_stylebox.content_margin_left = 6 - normal_sidetab_stylebox.content_margin_right = 6 - normal_sidetab_stylebox.content_margin_bottom = 3 - normal_sidetab_stylebox.content_margin_top = 3 + normal_sidetab_stylebox.content_margin_left = 6.0 + normal_sidetab_stylebox.content_margin_right = 6.0 + normal_sidetab_stylebox.content_margin_bottom = 3.0 + normal_sidetab_stylebox.content_margin_top = 3.0 theme.set_stylebox("normal", "SideTab", normal_sidetab_stylebox) var hovered_sidetab_stylebox := normal_sidetab_stylebox.duplicate() @@ -515,10 +515,10 @@ static func _setup_button(theme: Theme) -> void: pressed_sidetab_stylebox.bg_color = selected_tab_color pressed_sidetab_stylebox.border_color = selected_tab_border_color pressed_sidetab_stylebox.border_width_left = 2 - pressed_sidetab_stylebox.content_margin_left = 10 - pressed_sidetab_stylebox.content_margin_right = 6 - pressed_sidetab_stylebox.content_margin_bottom = 3 - pressed_sidetab_stylebox.content_margin_top = 3 + pressed_sidetab_stylebox.content_margin_left = 10.0 + pressed_sidetab_stylebox.content_margin_right = 6.0 + pressed_sidetab_stylebox.content_margin_bottom = 3.0 + pressed_sidetab_stylebox.content_margin_top = 3.0 theme.set_stylebox("pressed", "SideTab", pressed_sidetab_stylebox) theme.add_type("Swatch") @@ -871,17 +871,17 @@ static func _setup_tabcontainer(theme: Theme) -> void: panel_stylebox.border_width_bottom = 2 panel_stylebox.corner_radius_bottom_right = 5 panel_stylebox.corner_radius_bottom_left = 5 - panel_stylebox.content_margin_left = 8 - panel_stylebox.content_margin_right = 2 - panel_stylebox.content_margin_bottom = 2 - panel_stylebox.content_margin_top = 0 + panel_stylebox.content_margin_left = 8.0 + panel_stylebox.content_margin_right = 2.0 + panel_stylebox.content_margin_bottom = 2.0 + panel_stylebox.content_margin_top = 0.0 theme.set_stylebox("panel", "TabContainer", panel_stylebox) var tab_disabled_stylebox := StyleBoxEmpty.new() - tab_disabled_stylebox.content_margin_left = 12 - tab_disabled_stylebox.content_margin_right = 12 - tab_disabled_stylebox.content_margin_bottom = 3 - tab_disabled_stylebox.content_margin_top = 3 + tab_disabled_stylebox.content_margin_left = 12.0 + tab_disabled_stylebox.content_margin_right = 12.0 + tab_disabled_stylebox.content_margin_bottom = 3.0 + tab_disabled_stylebox.content_margin_top = 3.0 theme.set_stylebox("tab_disabled", "TabContainer", tab_disabled_stylebox) theme.set_stylebox("tab_focus", "TabContainer", StyleBoxEmpty.new()) @@ -889,30 +889,30 @@ static func _setup_tabcontainer(theme: Theme) -> void: tab_hover_stylebox.bg_color = hovered_tab_color tab_hover_stylebox.corner_radius_top_left = 4 tab_hover_stylebox.corner_radius_top_right = 4 - tab_hover_stylebox.content_margin_left = 12 - tab_hover_stylebox.content_margin_right = 12 - tab_hover_stylebox.content_margin_bottom = 3 - tab_hover_stylebox.content_margin_top = 3 + tab_hover_stylebox.content_margin_left = 12.0 + tab_hover_stylebox.content_margin_right = 12.0 + tab_hover_stylebox.content_margin_bottom = 3.0 + tab_hover_stylebox.content_margin_top = 3.0 theme.set_stylebox("tab_hovered", "TabContainer", tab_hover_stylebox) var tab_selected_stylebox := StyleBoxFlat.new() tab_selected_stylebox.bg_color = selected_tab_color tab_selected_stylebox.border_color = selected_tab_border_color tab_selected_stylebox.border_width_top = 2 - tab_selected_stylebox.content_margin_left = 12 - tab_selected_stylebox.content_margin_right = 12 - tab_selected_stylebox.content_margin_bottom = 3 - tab_selected_stylebox.content_margin_top = 3 + tab_selected_stylebox.content_margin_left = 12.0 + tab_selected_stylebox.content_margin_right = 12.0 + tab_selected_stylebox.content_margin_bottom = 3.0 + tab_selected_stylebox.content_margin_top = 3.0 theme.set_stylebox("tab_selected", "TabContainer", tab_selected_stylebox) var tab_unselected_stylebox := StyleBoxFlat.new() tab_unselected_stylebox.bg_color = normal_tab_color tab_unselected_stylebox.corner_radius_top_left = 4 tab_unselected_stylebox.corner_radius_top_right = 4 - tab_unselected_stylebox.content_margin_left = 12 - tab_unselected_stylebox.content_margin_right = 12 - tab_unselected_stylebox.content_margin_bottom = 3 - tab_unselected_stylebox.content_margin_top = 3 + tab_unselected_stylebox.content_margin_left = 12.0 + tab_unselected_stylebox.content_margin_right = 12.0 + tab_unselected_stylebox.content_margin_bottom = 3.0 + tab_unselected_stylebox.content_margin_top = 3.0 theme.set_stylebox("tab_unselected", "TabContainer", tab_unselected_stylebox) var tabbar_background_stylebox := StyleBoxFlat.new() @@ -934,7 +934,7 @@ static func _setup_textedit(theme: Theme) -> void: normal_stylebox.border_color = line_edit_normal_border_color normal_stylebox.set_border_width_all(2) normal_stylebox.set_corner_radius_all(5) - normal_stylebox.content_margin_left = 5 + normal_stylebox.content_margin_left = 5.0 theme.set_stylebox("normal", "TextEdit", normal_stylebox) var focus_stylebox := StyleBoxFlat.new() @@ -958,10 +958,10 @@ static func _setup_tooltip(theme: Theme) -> void: stylebox.border_color = common_panel_border_color stylebox.set_border_width_all(2) stylebox.set_corner_radius_all(2) - stylebox.content_margin_left = 6 - stylebox.content_margin_top = 1 - stylebox.content_margin_right = 6 - stylebox.content_margin_bottom = 3 + stylebox.content_margin_left = 6.0 + stylebox.content_margin_top = 1.0 + stylebox.content_margin_right = 6.0 + stylebox.content_margin_bottom = 3.0 theme.set_stylebox("panel", "TooltipPanel", stylebox) theme.add_type("TooltipLabel") diff --git a/src/utils/TranslationUtils.gd b/src/utils/TranslationUtils.gd index 255ef45..671737a 100644 --- a/src/utils/TranslationUtils.gd +++ b/src/utils/TranslationUtils.gd @@ -97,6 +97,7 @@ static func get_action_description(action_name: String, for_button := false) -> for_button else Translator.translate("Open GodSVG website") "check_updates": return Translator.translate("Check for updates") "quit": return Translator.translate("Quit the application") + "toggle_fullscreen": return Translator.translate("Toggle fullscreen") _: return action_name @@ -142,3 +143,25 @@ allowed_extensions: PackedStringArray) -> String: return Translator.translate( "The file extension {extension} is unsupported for this operation. Only {extension_list} files are supported.").format( {"extension": '".' + extension + '"', "extension_list": extension_list}) + +static func get_file_dialog_select_mode_title_text(extensions: PackedStringArray) -> String: + if extensions.size() > 1: + return Translator.translate("Select an image") + else: + # "an" because this can currently only show for SVG and XML files. + return Translator.translate("Select an {format} file").format( + {"format": get_extension_readable_name(extensions[0])}) + +static func get_file_dialog_save_mode_title_text(extension: String) -> String: + return Translator.translate("Save the {format} file").format( + {"format": get_extension_readable_name(extension)}) + +static func get_extension_readable_name(extension: String) -> String: + match extension: + "svg": return "SVG" + "png": return "PNG" + "webp": return "WebP" + "jpeg": return "JPEG" + "jpg": return "JPG" + "xml": return "XML" + _: return extension diff --git a/src/utils/Utils.gd b/src/utils/Utils.gd index 646cfaa..196a73c 100644 --- a/src/utils/Utils.gd +++ b/src/utils/Utils.gd @@ -107,3 +107,8 @@ static func get_clipboard_web_safe() -> String: if OS.has_feature("web"): return "" return DisplayServer.clipboard_get() + +static func has_clipboard_image_web_safe() -> bool: + if OS.has_feature("web"): + return false + return DisplayServer.clipboard_has_image() diff --git a/translations/GodSVG.pot b/translations/GodSVG.pot index 97968bc..52226f4 100644 --- a/translations/GodSVG.pot +++ b/translations/GodSVG.pot @@ -237,6 +237,14 @@ msgstr "" msgid "Snap size" msgstr "" +#: src/ui_parts/display.gd +msgid "Paste reference image" +msgstr "" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -311,22 +319,6 @@ msgstr "" msgid "Search files" msgstr "" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "" @@ -401,6 +393,7 @@ msgstr "" msgid "Add element" msgstr "" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "" @@ -433,7 +426,7 @@ msgstr "" msgid "Formatting" msgstr "" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "" @@ -477,6 +470,7 @@ msgstr "" msgid "Text color" msgstr "" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "" @@ -485,6 +479,7 @@ msgstr "" msgid "Error color" msgstr "" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "" @@ -561,6 +556,7 @@ msgstr "" msgid "Sync window title to file name" msgstr "" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "" @@ -593,10 +589,12 @@ msgstr "" msgid "New palette from XML" msgstr "" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "" @@ -701,6 +699,12 @@ msgstr "" msgid "Remove unnecessary parameters" msgstr "" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "" @@ -713,8 +717,7 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" #: src/ui_parts/settings_menu.gd @@ -725,8 +728,8 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" #: src/ui_parts/settings_menu.gd @@ -766,11 +769,11 @@ msgid "This SVG is not bound to a file location yet." msgstr "" #: src/ui_parts/update_menu.gd -msgid "Show prereleases" +msgid "Retry" msgstr "" #: src/ui_parts/update_menu.gd -msgid "Retry" +msgid "Show prereleases" msgstr "" #: src/ui_parts/update_menu.gd @@ -781,27 +784,32 @@ msgstr "" msgid "Retrieving information..." msgstr "" +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "" +#: src/ui_parts/update_menu.gd +msgid "View all releases" +msgstr "" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "" #: src/ui_parts/update_menu.gd -msgid "New versions" +msgid "New versions available!" msgstr "" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "" @@ -918,18 +926,6 @@ msgstr "" msgid "GodSVG doesn’t recognize this attribute" msgstr "" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "" @@ -970,6 +966,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Save SVG as" msgstr "" @@ -1182,6 +1182,10 @@ msgstr "" msgid "Quit the application" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "" @@ -1234,10 +1238,23 @@ msgstr "" msgid "Inspector" msgstr "" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd msgid "Viewport" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " diff --git a/translations/bg.po b/translations/bg.po index 74f7769..7fd6dbb 100644 --- a/translations/bg.po +++ b/translations/bg.po @@ -246,6 +246,14 @@ msgstr "Графики" msgid "Snap size" msgstr "Размер на захващането" +#: src/ui_parts/display.gd +msgid "Paste reference image" +msgstr "Постави справочно изображение" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "Линкове към платформи за дарение" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -320,22 +328,6 @@ msgstr "Превключи видимостта на скритите файло msgid "Search files" msgstr "Търсене из файловете" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "Запиши SVG-то" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Избери SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Избери XML файл" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Избери изображение" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Избери" @@ -412,6 +404,7 @@ msgstr "Синтактична грешка" msgid "Add element" msgstr "Добави елемент" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "Изключени" @@ -444,7 +437,7 @@ msgstr "Захващане" msgid "Formatting" msgstr "Форматиране" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Палети" @@ -492,6 +485,7 @@ msgstr "Цвят на коментарите" msgid "Text color" msgstr "Цвят на текста" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "Цвят на CDATA" @@ -500,6 +494,7 @@ msgstr "Цвят на CDATA" msgid "Error color" msgstr "Цвят на грешките" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Цвят на дръжките" @@ -576,6 +571,7 @@ msgstr "Използвай местния файлов мениджър" msgid "Sync window title to file name" msgstr "Синхронизирай името на прозореца с файла" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Размер на дръжките" @@ -608,10 +604,12 @@ msgstr "Добави палета" msgid "New palette from XML" msgstr "Добави палета от XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Форматировач за приложението" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Форматировач за експортиране" @@ -716,6 +714,14 @@ msgstr "Поредици от трансформации" msgid "Remove unnecessary parameters" msgstr "Премахни ненужните параметри" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" +"Когато е включено, натискането на раздел със средното копче на мишката " +"затваря раздела. Ако е изключено, средното копче фокусира раздела." + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Разменя посоките на влачене за намаляване и увеличаване" @@ -730,11 +736,10 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" -"Когато е включено, влаченето ще премести гледката. За увеличение, натисни " -"CTRL докато влачиш." +"Когато е включено, влаченето премества гледката. За увеличение, натисни CTRL " +"докато влачиш." #: src/ui_parts/settings_menu.gd msgid "" @@ -747,11 +752,11 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" -"Когато е изключено, името на прозореца ще остане \"GodSVG\". независимо от " -"сегашния файл." +"Когато е изключено, името на прозореца остава \"GodSVG\" без да включва " +"настоящия файл." #: src/ui_parts/settings_menu.gd msgid "Changes the visual size and grabbing area of handles." @@ -789,14 +794,14 @@ msgstr "Превърти напред" msgid "This SVG is not bound to a file location yet." msgstr "Това SVG не е свързано с местоположение на компютъра." -#: src/ui_parts/update_menu.gd -msgid "Show prereleases" -msgstr "Покажи предварителните издания" - #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Опитай отново" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Покажи предварителните издания" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Настояща версия" @@ -805,27 +810,32 @@ msgstr "Настояща версия" msgid "Retrieving information..." msgstr "Извлича се информацията..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Грешка в проверката за ъпдейти" +#: src/ui_parts/update_menu.gd +msgid "View all releases" +msgstr "Разгледай всички издания" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG е актуален." #: src/ui_parts/update_menu.gd -msgid "New versions" -msgstr "Нови версии" +msgid "New versions available!" +msgstr "Налични са нови версии!" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Създай" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Търсене на цвят" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Цветно колело" @@ -942,18 +952,6 @@ msgstr "Нова трансформация" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG не разпознава този атрибут" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Запази .\"{format}\" файла." - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Зареди изображение" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Импортирай {extension} файл" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Файлът не можа да бъде отворен." @@ -996,6 +994,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "Искаш ли да запишеш промените върху {file_name}?" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "Запиши SVG-то" + #: src/utils/TranslationUtils.gd msgid "Save SVG as" msgstr "Запиши SVG-то като" @@ -1054,11 +1056,11 @@ msgstr "Отвори SVG с външно приложение" #: src/utils/TranslationUtils.gd msgid "Show in File Manager" -msgstr "Покажи във Файловия мениджър" +msgstr "Покажи във файловия мениджър" #: src/utils/TranslationUtils.gd msgid "Show SVG in File Manager" -msgstr "Покажи SVG-то във Файловия мениджър" +msgstr "Покажи SVG-то във файловия мениджър" #: src/utils/TranslationUtils.gd msgid "Undo" @@ -1206,7 +1208,11 @@ msgstr "Провери за ъпдейти" #: src/utils/TranslationUtils.gd msgid "Quit the application" -msgstr "Излез от апликацията" +msgstr "Излизане от апликацията" + +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "Превключване на пълен екран" #: src/utils/TranslationUtils.gd msgid "Move to" @@ -1260,10 +1266,23 @@ msgstr "Редактор за код" msgid "Inspector" msgstr "Инспектор" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd msgid "Viewport" msgstr "Гледка" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Избери изображение" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "Избери {format} файл" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "Запази {format} файла" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " @@ -1275,15 +1294,3 @@ msgstr "" #: src/utils/TranslationUtils.gd msgid "The file extension is empty. Only {extension_list} files are supported." msgstr "Форматът е празен. Единствено {extension_list} файловете са подържани." - -#~ msgid "Show reference" -#~ msgstr "Покажни справочното изображение" - -#~ msgid "Overlay reference" -#~ msgstr "Насложи справочното изображение" - -#~ msgid "Rasterized SVG" -#~ msgstr "Растеризирай SVG" - -#~ msgid "Save as" -#~ msgstr "Запиши като" diff --git a/translations/de.po b/translations/de.po index ba446be..a713733 100644 --- a/translations/de.po +++ b/translations/de.po @@ -10,7 +10,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.5\n" +"X-Generator: Poedit 3.6\n" msgid "translation-credits" msgstr "Kiisu-Master, Swarkin" @@ -85,9 +85,8 @@ msgid "Restore" msgstr "Wiederherstellen" #: src/autoload/State.gd -#, fuzzy msgid "View in Inspector" -msgstr "Als Liste ansehen" +msgstr "Im Inspektor anzeigen" #: src/autoload/State.gd msgid "Convert To" @@ -250,6 +249,15 @@ msgstr "Visuelles" msgid "Snap size" msgstr "Rastergröße" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "Referenzbild laden" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -324,22 +332,6 @@ msgstr "Versteckte Dateien anzeigen" msgid "Search files" msgstr "Datei suchen" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "SVG speichern" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "SVG auswählen" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "XML Datei auswählen" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Bild auswählen" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Auswählen" @@ -416,13 +408,14 @@ msgstr "Syntaxfehler" msgid "Add element" msgstr "Element hinzufügen" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" -msgstr "" +msgstr "Ausgeschlossen" #: src/ui_parts/layout_popup.gd msgid "Drag and drop to change the layout" -msgstr "" +msgstr "Ziehen und Ablegen zum Ändern des Layouts" #: src/ui_parts/mac_menu.gd src/ui_parts/settings_menu.gd msgid "File" @@ -448,7 +441,7 @@ msgstr "Einrasten" msgid "Formatting" msgstr "Formatierung" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Paletten" @@ -460,6 +453,10 @@ msgstr "Tastenkombinationen" msgid "Theming" msgstr "Farbschema" +#: src/ui_parts/settings_menu.gd +msgid "Tab bar" +msgstr "Tableiste" + #: src/ui_parts/settings_menu.gd msgid "Other" msgstr "Anderes" @@ -492,6 +489,7 @@ msgstr "Kommentarfarbe" msgid "Text color" msgstr "Textfarbe" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "CDATA-Farbe" @@ -500,6 +498,7 @@ msgstr "CDATA-Farbe" msgid "Error color" msgstr "Fehlerfarbe" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Grifffarbe" @@ -533,9 +532,8 @@ msgid "Background color" msgstr "Hintergrundfarben" #: src/ui_parts/settings_menu.gd -#, fuzzy msgid "Grid color" -msgstr "Gültige Farbe" +msgstr "Rasterfarbe" #: src/ui_parts/settings_menu.gd msgid "Valid color" @@ -551,7 +549,7 @@ msgstr "Eingabe" #: src/ui_parts/settings_menu.gd msgid "Close tabs with middle mouse button" -msgstr "" +msgstr "Registerkarten mit mittlerer Maustaste schließen" #: src/ui_parts/settings_menu.gd msgid "Invert zoom direction" @@ -577,6 +575,7 @@ msgstr "Nativen Dateidialog verwenden" msgid "Sync window title to file name" msgstr "Fenstertitel mit Dateinamen synchronisieren" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Griffgröße" @@ -609,10 +608,12 @@ msgstr "Neue Palette" msgid "New palette from XML" msgstr "Neue Palette aus XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Editor-Formatierer" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Export-Formatierer" @@ -717,6 +718,15 @@ msgstr "Transformationlisten" msgid "Remove unnecessary parameters" msgstr "Unnötige Parameter entfernen" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" +"Wenn diese Option aktiviert ist, wird die Registerkarte durch Anklicken mit " +"der mittleren Maustaste geschlossen. Wenn diese Option ausgeschaltet ist, " +"wird die Registerkarte stattdessen fokussiert." + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Tauscht die Scrollrichtung für das Rein- und Rauszoomen." @@ -731,11 +741,10 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" -"Wenn diese Option aktiviert ist, wird durch Scrollen die Ansicht geschwenkt. " -"Halten Sie zum Zoomen beim Scrollen die Strg-Taste gedrückt." +"Wenn diese Option aktiviert ist, wird die Ansicht durch Scrollen verschoben. " +"Um zu zoomen muss beim Scrollen die STRG-Taste gedrückt werden." #: src/ui_parts/settings_menu.gd msgid "" @@ -748,11 +757,11 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" -"Wenn diese Option deaktiviert ist, wird der Fenstertitel unabhängig von der " -"aktuellen Datei \"GodSVG\" bleiben." +"Wenn diese Option deaktiviert ist, bleibt der Fenstertitel \"GodSVG\", ohne " +"die aktuelle Datei anzuzeigen." #: src/ui_parts/settings_menu.gd msgid "Changes the visual size and grabbing area of handles." @@ -788,16 +797,16 @@ msgstr "Nach vorne scrollen" #: src/ui_parts/tab_bar.gd msgid "This SVG is not bound to a file location yet." -msgstr "Das SVG ist noch nicht an einen Dateiort gebunden." - -#: src/ui_parts/update_menu.gd -msgid "Show prereleases" -msgstr "Vorschauversionen anzeigen" +msgstr "Dieses SVG ist noch nicht an einen Dateiort gebunden." #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Erneut versuchen" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Vorschauversionen anzeigen" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Aktuelle Version" @@ -806,27 +815,34 @@ msgstr "Aktuelle Version" msgid "Retrieving information..." msgstr "Abruf von Informationen..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Aktualisierungsprüfung fehlgeschlagen" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Alle Elemente auswählen" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG ist auf dem neuesten Stand." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Neue Versionen" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Erstellen" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Farbe suchen" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Farbauswahl" @@ -943,18 +959,6 @@ msgstr "Neue Transformation" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG erkennt diese Attribute nicht" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Die .\"{format}\" Datei speichern" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Bilddatei laden" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "{extension}-Datei importieren" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Die Datei konnte nicht geöffnet werden." @@ -998,9 +1002,12 @@ msgid "Do you want to save the changes made to {file_name}?" msgstr "Möchten Sie die an {file_name} vorgenommenen Änderungen speichern?" #: src/utils/TranslationUtils.gd -#, fuzzy +msgid "Save SVG" +msgstr "SVG speichern" + +#: src/utils/TranslationUtils.gd msgid "Save SVG as" -msgstr "SVG speichern als…" +msgstr "SVG speichern als" #: src/utils/TranslationUtils.gd msgid "Close tabs to the left" @@ -1031,18 +1038,16 @@ msgid "Optimize" msgstr "Optimieren" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Optimize SVG" -msgstr "Optimieren" +msgstr "SVG optimieren" #: src/utils/TranslationUtils.gd msgid "Copy all text" msgstr "Text kopieren" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Copy the SVG text" -msgstr "Text kopieren" +msgstr "SVG-Text kopieren" #: src/utils/TranslationUtils.gd msgid "Reset SVG" @@ -1101,18 +1106,16 @@ msgid "Delete the selection" msgstr "Auswahl löschen" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move up" -msgstr "Nach oben" +msgstr "Nach oben verschieben" #: src/utils/TranslationUtils.gd msgid "Move the selection up" msgstr "Auswahl nach oben verschieben" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move down" -msgstr "Nach unten" +msgstr "Nach unten verschieben" #: src/utils/TranslationUtils.gd msgid "Move the selection down" @@ -1214,6 +1217,10 @@ msgstr "Nach Aktualisierungen suchen" msgid "Quit the application" msgstr "Anwendung verlassen" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "Vollbildmodus umschalten" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Bewege zu" @@ -1260,16 +1267,28 @@ msgstr "Absolut" #: src/utils/TranslationUtils.gd msgid "Code editor" -msgstr "" +msgstr "Code-Editor" #: src/utils/TranslationUtils.gd msgid "Inspector" -msgstr "" +msgstr "Inspektor" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Viewport" -msgstr "Ansicht" +msgstr "Ansichtsfenster" + +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Bild auswählen" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "{format}-Datei auswählen" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "Die {format}-Datei speichern" #: src/utils/TranslationUtils.gd msgid "" @@ -1285,6 +1304,18 @@ msgstr "" "Die Dateierweiterung ist leer. Nur {extension_list} Dateien werden " "unterstützt." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Die .\"{format}\" Datei speichern" + +#~ msgid "Load an image file" +#~ msgstr "Bilddatei laden" + +#~ msgid "Import a {extension} file" +#~ msgstr "{extension}-Datei importieren" + +#~ msgid "Select an SVG" +#~ msgstr "SVG auswählen" + #~ msgid "Show reference" #~ msgstr "Referenz anzeigen" @@ -1340,9 +1371,6 @@ msgstr "" #~ msgid "Open SVG file" #~ msgstr "Datei öffnen" -#~ msgid "Select all elements" -#~ msgstr "Alle Elemente auswählen" - #~ msgid "Duplicate the selected elements" #~ msgstr "Ausgewählte Elemente duplizieren" diff --git a/translations/en.po b/translations/en.po index ad328e2..9e571f6 100644 --- a/translations/en.po +++ b/translations/en.po @@ -238,6 +238,14 @@ msgstr "" msgid "Snap size" msgstr "" +#: src/ui_parts/display.gd +msgid "Paste reference image" +msgstr "" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -312,22 +320,6 @@ msgstr "" msgid "Search files" msgstr "" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "" @@ -402,6 +394,7 @@ msgstr "" msgid "Add element" msgstr "" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "" @@ -434,7 +427,7 @@ msgstr "" msgid "Formatting" msgstr "" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "" @@ -478,6 +471,7 @@ msgstr "" msgid "Text color" msgstr "" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "" @@ -486,6 +480,7 @@ msgstr "" msgid "Error color" msgstr "" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "" @@ -562,6 +557,7 @@ msgstr "" msgid "Sync window title to file name" msgstr "" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "" @@ -594,10 +590,12 @@ msgstr "" msgid "New palette from XML" msgstr "" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "" @@ -702,6 +700,12 @@ msgstr "" msgid "Remove unnecessary parameters" msgstr "" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "" @@ -714,8 +718,7 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" #: src/ui_parts/settings_menu.gd @@ -726,8 +729,8 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" #: src/ui_parts/settings_menu.gd @@ -767,11 +770,11 @@ msgid "This SVG is not bound to a file location yet." msgstr "" #: src/ui_parts/update_menu.gd -msgid "Show prereleases" +msgid "Retry" msgstr "" #: src/ui_parts/update_menu.gd -msgid "Retry" +msgid "Show prereleases" msgstr "" #: src/ui_parts/update_menu.gd @@ -782,27 +785,32 @@ msgstr "" msgid "Retrieving information..." msgstr "" +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "" +#: src/ui_parts/update_menu.gd +msgid "View all releases" +msgstr "" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "" #: src/ui_parts/update_menu.gd -msgid "New versions" +msgid "New versions available!" msgstr "" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "" @@ -919,18 +927,6 @@ msgstr "" msgid "GodSVG doesn’t recognize this attribute" msgstr "" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "" @@ -971,6 +967,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Save SVG as" msgstr "" @@ -1183,6 +1183,10 @@ msgstr "" msgid "Quit the application" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "" @@ -1235,10 +1239,23 @@ msgstr "" msgid "Inspector" msgstr "" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd msgid "Viewport" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " diff --git a/translations/et.po b/translations/et.po index b8d8322..b9d5553 100644 --- a/translations/et.po +++ b/translations/et.po @@ -84,9 +84,8 @@ msgid "Restore" msgstr "Taasta" #: src/autoload/State.gd -#, fuzzy msgid "View in Inspector" -msgstr "Näita nimekirjas" +msgstr "Näita inspektoris" #: src/autoload/State.gd msgid "Convert To" @@ -246,6 +245,14 @@ msgstr "Visuaalid" msgid "Snap size" msgstr "Joondamise mastaap" +#: src/ui_parts/display.gd +msgid "Paste reference image" +msgstr "Kleebi võrdluspilt" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -320,22 +327,6 @@ msgstr "Lülita peidetud failide kuvamine sisse" msgid "Search files" msgstr "Otsi faile" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "Salvesta SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Vali SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Vali XML fail" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Vali pilt" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Vali" @@ -412,13 +403,14 @@ msgstr "Süntaksiviga" msgid "Add element" msgstr "Lisa element" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" -msgstr "" +msgstr "Peidetud" #: src/ui_parts/layout_popup.gd msgid "Drag and drop to change the layout" -msgstr "" +msgstr "Lohista, et muuta paigutust" #: src/ui_parts/mac_menu.gd src/ui_parts/settings_menu.gd msgid "File" @@ -444,13 +436,13 @@ msgstr "Joonda" msgid "Formatting" msgstr "Vorming" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Värvipaletid" #: src/ui_parts/settings_menu.gd msgid "Shortcuts" -msgstr "Otseklahvid" +msgstr "Kiirklahvid" #: src/ui_parts/settings_menu.gd msgid "Theming" @@ -492,6 +484,7 @@ msgstr "Kommentaari värv" msgid "Text color" msgstr "Teksti värv" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "CDATA värv" @@ -500,6 +493,7 @@ msgstr "CDATA värv" msgid "Error color" msgstr "Errori värv" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Pideme värv" @@ -533,9 +527,8 @@ msgid "Background color" msgstr "Tausta värv" #: src/ui_parts/settings_menu.gd -#, fuzzy msgid "Grid color" -msgstr "Kehtiva värv" +msgstr "Ruudustiku värv" #: src/ui_parts/settings_menu.gd msgid "Valid color" @@ -575,8 +568,9 @@ msgstr "Kasuta süsteemi failidialoogi" #: src/ui_parts/settings_menu.gd msgid "Sync window title to file name" -msgstr "Sünkroniseeri akna tiitel avatud faili nimega" +msgstr "Sünkrooni akna tiitel avatud faili nimega" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Pidemete suurus" @@ -609,10 +603,12 @@ msgstr "Uus palett" msgid "New palette from XML" msgstr "Uus palett XML-ist" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Redaktori vormindus" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Ekspordi vormindus" @@ -717,6 +713,14 @@ msgstr "Teisendused" msgid "Remove unnecessary parameters" msgstr "Eemalda ebavajalikud parameetrid" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" +"Sisselülitamisel sulgeb keskmise hiireklahviga kaardile vajutamine selle. " +"Väljalülitamisel fokuseeriks see selle." + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Vahetab kerimissuunad suurendamiseks ja vähendamiseks ümber." @@ -731,8 +735,7 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" "Sisselülitamisel kerimine liigutab vaadet. Suurendamiseks hoia CTRL klahvi " "kerimise ajal." @@ -747,8 +750,8 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" "Väljalülitamisel jääb akna nimieks \"GodSVG\" sõltumata avatud failist." @@ -770,7 +773,7 @@ msgstr "Horisontaalne riba kahe reaga" #: src/ui_parts/shortcut_panel_config.gd msgid "Configure Shortcut Panel" -msgstr "Konfigureeri otseklahvide paneeli" +msgstr "Kiirklahvida seadistamise paneel" #: src/ui_parts/tab_bar.gd src/utils/TranslationUtils.gd msgid "Create a new tab" @@ -788,14 +791,14 @@ msgstr "Keri edasi" msgid "This SVG is not bound to a file location yet." msgstr "See SVG ei ole veel seotud failiasukohaga." -#: src/ui_parts/update_menu.gd -msgid "Show prereleases" -msgstr "Näita eelväljaandeid" - #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Proovi uuesti" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Näita eelväljaandeid" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Praegune versioon" @@ -804,27 +807,34 @@ msgstr "Praegune versioon" msgid "Retrieving information..." msgstr "Informatsiooni saamine..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Uuenduste otsimine ebaõnnestus" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Näita eelväljaandeid" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG on ajakohane." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Uued versioonid" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Loo" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Otsi värvi" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Värvivalija" @@ -915,7 +925,7 @@ msgstr "Kasutamata" #: src/ui_widgets/setting_shortcut.gd msgid "Add shortcut" -msgstr "Lisa otseklahv" +msgstr "Lisa kiirklahv" #: src/ui_widgets/setting_shortcut.gd msgid "Press keys…" @@ -941,18 +951,6 @@ msgstr "Uus teisendus" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG ei tunne seda atribuuti" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Salvesta .\"{format}\" fail" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Ava pildifail" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Impordi {extension} fail" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Faili avamine ebaõnnestus." @@ -996,9 +994,12 @@ msgid "Do you want to save the changes made to {file_name}?" msgstr "Kas soovite salvestada {file_name} kallal tehtud muudatused?" #: src/utils/TranslationUtils.gd -#, fuzzy +msgid "Save SVG" +msgstr "Salvesta SVG" + +#: src/utils/TranslationUtils.gd msgid "Save SVG as" -msgstr "Salvesta SVG kui…" +msgstr "Salvesta SVG kui" #: src/utils/TranslationUtils.gd msgid "Close tabs to the left" @@ -1029,18 +1030,16 @@ msgid "Optimize" msgstr "Optimeeri" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Optimize SVG" -msgstr "Optimeeri" +msgstr "Optimeeri SVG" #: src/utils/TranslationUtils.gd msgid "Copy all text" msgstr "Kopeeri terve tekst" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Copy the SVG text" -msgstr "Kopeeri terve tekst" +msgstr "Kopeeri SVG tekst" #: src/utils/TranslationUtils.gd msgid "Reset SVG" @@ -1099,7 +1098,6 @@ msgid "Delete the selection" msgstr "Kustuta valik" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move up" msgstr "Liiguta üles" @@ -1108,7 +1106,6 @@ msgid "Move the selection up" msgstr "Liiguta valik üles" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move down" msgstr "Liiguta alla" @@ -1212,6 +1209,10 @@ msgstr "Otsi uuendusi" msgid "Quit the application" msgstr "Sulge rakendus" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "Täisekraan" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Liigu" @@ -1258,17 +1259,29 @@ msgstr "Absoluutne" #: src/utils/TranslationUtils.gd msgid "Code editor" -msgstr "" +msgstr "Koodiredaktor" #: src/utils/TranslationUtils.gd msgid "Inspector" -msgstr "" +msgstr "Inspektor" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Viewport" msgstr "Vaade" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Vali pilt" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "Vali {format} fail" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "Salvesta {format} fail" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " @@ -1281,6 +1294,18 @@ msgstr "" msgid "The file extension is empty. Only {extension_list} files are supported." msgstr "Faililaiend on tühi. Ainult {extension_list} on toetatud." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Salvesta .\"{format}\" fail" + +#~ msgid "Load an image file" +#~ msgstr "Ava pildifail" + +#~ msgid "Import a {extension} file" +#~ msgstr "Impordi {extension} fail" + +#~ msgid "Select an SVG" +#~ msgstr "Vali SVG" + #~ msgid "Show reference" #~ msgstr "Kuva võrdluspilti" diff --git a/translations/fr.po b/translations/fr.po index c2bb499..8f76a58 100644 --- a/translations/fr.po +++ b/translations/fr.po @@ -246,6 +246,15 @@ msgstr "Vue" msgid "Snap size" msgstr "Taille d'aimantation" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "Charger une image de référence" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -320,22 +329,6 @@ msgstr "Activer/Désactiver la visibilité des fichiers cachés" msgid "Search files" msgstr "Rechercher des fichiers" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "Sauvegarder le SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Sélectionner un SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Sélectionner un fichier XML" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Sélectionner une image" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Sélectionner" @@ -412,6 +405,7 @@ msgstr "Erreur de syntaxe" msgid "Add element" msgstr "Ajouter un élément" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "" @@ -444,7 +438,7 @@ msgstr "Aimanter" msgid "Formatting" msgstr "Formatage" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Palettes" @@ -488,6 +482,7 @@ msgstr "Couleur de commentaire" msgid "Text color" msgstr "Couleur de texte" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "Couleur de CDATA" @@ -496,6 +491,7 @@ msgstr "Couleur de CDATA" msgid "Error color" msgstr "Couleur d'erreur" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Couleurs des poignées" @@ -573,6 +569,7 @@ msgstr "Utiliser la boîte de dialogue de fichiers native" msgid "Sync window title to file name" msgstr "Synchroniser le titre de la fenêtre au nom du fichier" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Taille des poignées" @@ -605,10 +602,12 @@ msgstr "Nouvelle palette" msgid "New palette from XML" msgstr "Nouvelle palette depuis du XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Formateur de l'éditeur" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Formateur d'exportation" @@ -713,6 +712,12 @@ msgstr "Transformer les listes" msgid "Remove unnecessary parameters" msgstr "Retirer les paramètres inutiles" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "" @@ -727,9 +732,9 @@ msgstr "" "la limite." #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" "Si activé, défiler fera balayer la vue. Pour zoomer, maintenez CTRL en " "défilant." @@ -744,9 +749,10 @@ msgstr "" "GodSVG." #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" "Si désactivé, le titre de la fenêtre restera simplement « GodSVG » quel que " "soit le fichier actuel." @@ -787,14 +793,14 @@ msgstr "Défiler en avant" msgid "This SVG is not bound to a file location yet." msgstr "Ce SVG n'est pas encore lié à un emplacement de fichier." -#: src/ui_parts/update_menu.gd -msgid "Show prereleases" -msgstr "Inclure les versions préliminaires" - #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Réessayer" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Inclure les versions préliminaires" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Version actuelle" @@ -803,27 +809,34 @@ msgstr "Version actuelle" msgid "Retrieving information..." msgstr "Récupération d'information en cours…" +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Échec de la vérification de mise à jour" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Sélectionner tous les éléments" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG est à jour." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Nouvelles versions" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Créer" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Rechercher la couleur" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Pipette" @@ -940,18 +953,6 @@ msgstr "Nouvelle transformation" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG ne reconnaît pas cet attribut" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Enregistrer le fichier .\"{format}\"" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Charger un fichier image" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Importer un fichier {extension}" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Le fichier n'a pas pu être ouvert." @@ -994,6 +995,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "Voulez-vous enregistrer les modifications de {file_name} ?" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "Sauvegarder le SVG" + #: src/utils/TranslationUtils.gd #, fuzzy msgid "Save SVG as" @@ -1211,6 +1216,10 @@ msgstr "Vérifier les mises à jour" msgid "Quit the application" msgstr "Quitter l'application" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Déplacer vers" @@ -1263,11 +1272,26 @@ msgstr "" msgid "Inspector" msgstr "" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd #, fuzzy msgid "Viewport" msgstr "Affichage" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Sélectionner une image" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Select an {format} file" +msgstr "Sélectionner un fichier XML" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Save the {format} file" +msgstr "Enregistrer le fichier .\"{format}\"" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " @@ -1282,6 +1306,18 @@ msgstr "" "L'extension de fichier est vide. Seuls les fichiers {extension_list} sont " "supportés." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Enregistrer le fichier .\"{format}\"" + +#~ msgid "Load an image file" +#~ msgstr "Charger un fichier image" + +#~ msgid "Import a {extension} file" +#~ msgstr "Importer un fichier {extension}" + +#~ msgid "Select an SVG" +#~ msgstr "Sélectionner un SVG" + #~ msgid "Show reference" #~ msgstr "Montrer la référence" @@ -1330,9 +1366,6 @@ msgstr "" #~ msgid "Open SVG file" #~ msgstr "Ouvrir le fichier" -#~ msgid "Select all elements" -#~ msgstr "Sélectionner tous les éléments" - #~ msgid "Duplicate the selected elements" #~ msgstr "Dupliquer les éléments sélectionnés" diff --git a/translations/nl.po b/translations/nl.po index 82efb72..6d86e13 100644 --- a/translations/nl.po +++ b/translations/nl.po @@ -247,6 +247,15 @@ msgstr "Visuelen" msgid "Snap size" msgstr "Maat inknappen" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "Referentiebeeld inladen" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -321,22 +330,6 @@ msgstr "De zichtbaarheit van verborgen bestanden omschakelen" msgid "Search files" msgstr "Bestanden zoeken" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "SVG opslaan" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Kies een SVG uit" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Kies een XML bestand uit" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Kies een afbeedling" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Selecteren" @@ -413,6 +406,7 @@ msgstr "Syntaxfout" msgid "Add element" msgstr "Element toevoegen" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "" @@ -445,7 +439,7 @@ msgstr "Knappen" msgid "Formatting" msgstr "Formattering" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Paletten" @@ -493,6 +487,7 @@ msgstr "Commentaarkleur" msgid "Text color" msgstr "Textkleur" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "CDATA-kleur" @@ -501,6 +496,7 @@ msgstr "CDATA-kleur" msgid "Error color" msgstr "Fout-kleur" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Handvatkleuren" @@ -578,6 +574,7 @@ msgstr "Gebruik inheemse bestandendialoog" msgid "Sync window title to file name" msgstr "Synchroniseer venstertitel naar bestandsnaam" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Handvat maat" @@ -610,10 +607,12 @@ msgstr "Nieuw palette" msgid "New palette from XML" msgstr "Nieuwe palette uit XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Editor-formatter" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Exportformatter" @@ -718,6 +717,12 @@ msgstr "Transformeer lijsten" msgid "Remove unnecessary parameters" msgstr "Verwijder onnodige parameters" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Verwisselt de scroll richtingen voor inzoomen en uitzoomen." @@ -731,9 +736,9 @@ msgstr "" "tijdens het rondkijken." #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" "Als ingeschakeld, scrollen zal het weergave verschuiven. Om te zoomen,houd " "CTRL ingedrukt tijdens scrollen." @@ -748,9 +753,10 @@ msgstr "" "bestandendialoog." #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" "Als dit uitgeschakelt is, blijft de venstertitel simpelweg \"GodSVG\" " "achteloos van het huidige bestand." @@ -791,14 +797,14 @@ msgstr "Scroll vooruit" msgid "This SVG is not bound to a file location yet." msgstr "Deze SVG is nog niet gebonden aan een bestandslocatie." -#: src/ui_parts/update_menu.gd -msgid "Show prereleases" -msgstr "Laat prereleases zien" - #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Opnieuw proberen" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Laat prereleases zien" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Huidige versie" @@ -807,27 +813,34 @@ msgstr "Huidige versie" msgid "Retrieving information..." msgstr "Informatie aan het ophalen..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Updatecontrole mislukt" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Selecteer alle elementen" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG is up-to-date." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Nieuwe versies" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Creëren" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Zoekkleur" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Kleurenplukker" @@ -944,18 +957,6 @@ msgstr "Nieuwe transformatie" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG herkent deze attribuut niet" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Bewaar het .\"{format}\" bestand" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Laad een afbeeldingsbestand" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Importeer een {extension} bestand" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Het bestand kon niet worden geopend." @@ -998,6 +999,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "Wilt u de aanpassingen opslaan als {file_name}?" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "SVG opslaan" + #: src/utils/TranslationUtils.gd #, fuzzy msgid "Save SVG as" @@ -1215,6 +1220,10 @@ msgstr "Nakijken voor updates" msgid "Quit the application" msgstr "Applicatie afsluiten" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Verplaats naar" @@ -1267,11 +1276,26 @@ msgstr "" msgid "Inspector" msgstr "" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd #, fuzzy msgid "Viewport" msgstr "Zicht" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Kies een afbeedling" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Select an {format} file" +msgstr "Kies een XML bestand uit" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Save the {format} file" +msgstr "Bewaar het .\"{format}\" bestand" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " @@ -1286,6 +1310,18 @@ msgstr "" "Deze bestandsextensie is leeg. Alleen {extension_list} bestanden zijn " "ondersteund." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Bewaar het .\"{format}\" bestand" + +#~ msgid "Load an image file" +#~ msgstr "Laad een afbeeldingsbestand" + +#~ msgid "Import a {extension} file" +#~ msgstr "Importeer een {extension} bestand" + +#~ msgid "Select an SVG" +#~ msgstr "Kies een SVG uit" + #~ msgid "Show reference" #~ msgstr "Referentie weergeven" @@ -1330,9 +1366,6 @@ msgstr "" #~ msgid "Open SVG file" #~ msgstr "Open SVG bestand" -#~ msgid "Select all elements" -#~ msgstr "Selecteer alle elementen" - #~ msgid "Duplicate the selected elements" #~ msgstr "Dupliceer de gekozen elementen" diff --git a/translations/pt_BR.po b/translations/pt_BR.po index 0912fcb..1b1b6e3 100644 --- a/translations/pt_BR.po +++ b/translations/pt_BR.po @@ -248,6 +248,15 @@ msgstr "Visuais" msgid "Snap size" msgstr "Tamanho de encaixe" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "Carregar imagem de referência" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -323,22 +332,6 @@ msgstr "Alternar a visibilidade de arquivos escondidos" msgid "Search files" msgstr "Procurar arquivos" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "Salvar SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Selecionar um SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Selecionar um arquivo XML" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Selecionar uma imagem" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Selecionar" @@ -415,6 +408,7 @@ msgstr "Erro de sintaxe" msgid "Add element" msgstr "Adicionar elemento" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "" @@ -447,7 +441,7 @@ msgstr "Encaixe" msgid "Formatting" msgstr "Formatação" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Paletas" @@ -491,6 +485,7 @@ msgstr "Cor de comentário" msgid "Text color" msgstr "Cor de texto" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "Cor de CDATA" @@ -499,6 +494,7 @@ msgstr "Cor de CDATA" msgid "Error color" msgstr "Cor de erro" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Cor de alça" @@ -576,6 +572,7 @@ msgstr "Utilizar diálogo de arquivos nativo" msgid "Sync window title to file name" msgstr "Sincronizar título de janela com o nome do arquivo" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Tamanho de alça" @@ -608,10 +605,12 @@ msgstr "Nova paleta" msgid "New palette from XML" msgstr "Nova paleta a partir de um XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Formatador do editor" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Formatador de exportação" @@ -716,6 +715,12 @@ msgstr "Transformar listas" msgid "Remove unnecessary parameters" msgstr "Remover parâmetros desnecessários" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Troca as direções de rolagem para aumentar e diminuir o zoom." @@ -729,9 +734,9 @@ msgstr "" "viewport quando movimentando a visualização." #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" "Se habilitado, a rolagem do mouse irá movimentar a tela. Para realizar o " "zoom, pressione CTRL enquanto rola." @@ -745,9 +750,10 @@ msgstr "" "desabilitado, usa o diálogo de arquivo embutido no GodSVG." #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" "Se desabilitado, o título da janela permanecerá como \"GodSVG\" independente " "do arquivo aberto." @@ -788,15 +794,15 @@ msgstr "Rolar para frente" msgid "This SVG is not bound to a file location yet." msgstr "Esse SVG ainda não está vinculado a um local de arquivo." +#: src/ui_parts/update_menu.gd +msgid "Retry" +msgstr "Tentar novamente" + #: src/ui_parts/update_menu.gd #, fuzzy msgid "Show prereleases" msgstr "Incluir pré-lançamentos" -#: src/ui_parts/update_menu.gd -msgid "Retry" -msgstr "Tentar novamente" - #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Versão Atual" @@ -805,27 +811,34 @@ msgstr "Versão Atual" msgid "Retrieving information..." msgstr "Pegando informação..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Verificação de atualização falhou" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Incluir pré-lançamentos" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG está atualizado." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Novas versões" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Criar" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Procurar cor" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Seletor de Cores" @@ -942,18 +955,6 @@ msgstr "Nova transformação" msgid "GodSVG doesn’t recognize this attribute" msgstr "O GodSVG não reconhece este atributo" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Salvar o arquivo .\"{format}\"" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Carregar um arquivo de imagem" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Importar um arquivo {extension}" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Este arquivo não pode ser aberto." @@ -996,6 +997,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "Salvar SVG" + #: src/utils/TranslationUtils.gd #, fuzzy msgid "Save SVG as" @@ -1213,6 +1218,10 @@ msgstr "Verificar atualizações" msgid "Quit the application" msgstr "Fechar programa" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Mover para" @@ -1265,11 +1274,26 @@ msgstr "" msgid "Inspector" msgstr "" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd #, fuzzy msgid "Viewport" msgstr "Visualizar" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Selecionar uma imagem" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Select an {format} file" +msgstr "Selecionar um arquivo XML" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Save the {format} file" +msgstr "Salvar o arquivo .\"{format}\"" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " @@ -1284,6 +1308,18 @@ msgstr "" "A extensão de arquivo está vazia. Somente arquivos {extension_list} são " "suportados." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Salvar o arquivo .\"{format}\"" + +#~ msgid "Load an image file" +#~ msgstr "Carregar um arquivo de imagem" + +#~ msgid "Import a {extension} file" +#~ msgstr "Importar um arquivo {extension}" + +#~ msgid "Select an SVG" +#~ msgstr "Selecionar um SVG" + #~ msgid "Show reference" #~ msgstr "Mostrar referência" diff --git a/translations/ru.po b/translations/ru.po index 45483ac..f6ced34 100644 --- a/translations/ru.po +++ b/translations/ru.po @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.5\n" +"X-Generator: Poedit 3.6\n" msgid "translation-credits" msgstr "volkov, Gallifreyan " @@ -58,7 +58,6 @@ msgid "Export" msgstr "Экспортовать" #: src/autoload/HandlerGUI.gd -#, fuzzy msgid "" "The graphic can be exported only as SVG because its proportions are too " "extreme." @@ -87,9 +86,8 @@ msgid "Restore" msgstr "Восстановить" #: src/autoload/State.gd -#, fuzzy msgid "View in Inspector" -msgstr "Просмотреть в списке" +msgstr "Просмотреть в инспектор" #: src/autoload/State.gd msgid "Convert To" @@ -249,6 +247,15 @@ msgstr "Внешний вид" msgid "Snap size" msgstr "Размер привязки" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "Загрузить референс" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -324,22 +331,6 @@ msgstr "Переключить видимость скрытых файлов" msgid "Search files" msgstr "Искать файлы" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "Сохранить SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Выбрать SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Выбрать XML файл" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Выбрать изображение" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Выбрать" @@ -416,13 +407,14 @@ msgstr "Синтаксическая ошибка" msgid "Add element" msgstr "Добавить элемент" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" -msgstr "" +msgstr "Исключены" #: src/ui_parts/layout_popup.gd msgid "Drag and drop to change the layout" -msgstr "" +msgstr "Перетягивайте, чтобы изменить макет" #: src/ui_parts/mac_menu.gd src/ui_parts/settings_menu.gd msgid "File" @@ -448,7 +440,7 @@ msgstr "Привязка" msgid "Formatting" msgstr "Форматирование" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Палитры" @@ -496,6 +488,7 @@ msgstr "Цвет комментария" msgid "Text color" msgstr "Цвет текста" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "Цвет CDATA" @@ -504,6 +497,7 @@ msgstr "Цвет CDATA" msgid "Error color" msgstr "Цвет ошибки" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Цвет ручки редактирования" @@ -537,9 +531,8 @@ msgid "Background color" msgstr "Цвет фона" #: src/ui_parts/settings_menu.gd -#, fuzzy msgid "Grid color" -msgstr "Цвет валидности" +msgstr "Цвет сетки" #: src/ui_parts/settings_menu.gd msgid "Valid color" @@ -581,6 +574,7 @@ msgstr "Использовать родной файловый диалог си msgid "Sync window title to file name" msgstr "Синхронизировать заголовок окна с названием файла" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Размер ручек" @@ -613,10 +607,12 @@ msgstr "Новая палитра" msgid "New palette from XML" msgstr "Новая палитра из XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Форматер редактора" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Форматер экспорта" @@ -721,6 +717,14 @@ msgstr "Список трансформаций" msgid "Remove unnecessary parameters" msgstr "Удалить ненужные параметры" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" +"Если включено - нажатие на вкладку средней кнопкой мыши закроет ее. Если " +"выключено - вкладка получит фокус." + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Поменяет местами направление прокрутки при масштабировании." @@ -735,10 +739,9 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" -"Если включено, прокрутка будет перемещать окно просмотра. Чтобы " +"Если включено - прокрутка будет перемещать окно просмотра. Чтобы " "масштабировать зажмите CTRL при прокручивании." #: src/ui_parts/settings_menu.gd @@ -752,11 +755,11 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" -"Если выключено, заголовок окна будет просто \"GodSVG\" независимо от " -"текущего файла." +"Если выключено - заголовок окна будет просто \"GodSVG\", не включая текущий " +"файл." #: src/ui_parts/settings_menu.gd msgid "Changes the visual size and grabbing area of handles." @@ -794,14 +797,14 @@ msgstr "Прокрутить вперед" msgid "This SVG is not bound to a file location yet." msgstr "Это SVG изображение еще не связано с расположением файла." -#: src/ui_parts/update_menu.gd -msgid "Show prereleases" -msgstr "Показывать тестовые сборки" - #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Попробовать еще раз" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Показывать тестовые сборки" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Текущая версия" @@ -810,27 +813,34 @@ msgstr "Текущая версия" msgid "Retrieving information..." msgstr "Загрузка информации..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Не удалось проверить обновления" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Показывать тестовые сборки" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "Установлена последняя версия GodSVG." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Новые версии" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Создать" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Искать цвет" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Цветовая пипетка" @@ -947,18 +957,6 @@ msgstr "Новая трансформация" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG не может распознать этот атрибут" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Сохранить .\"{format}\" файл" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Загрузить изображение" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Импортировать {extension} файл" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Файл невозможно открыть." @@ -1002,9 +1000,12 @@ msgid "Do you want to save the changes made to {file_name}?" msgstr "Сохранить изменения в {file_name}?" #: src/utils/TranslationUtils.gd -#, fuzzy +msgid "Save SVG" +msgstr "Сохранить SVG" + +#: src/utils/TranslationUtils.gd msgid "Save SVG as" -msgstr "Сохранить SVG как…" +msgstr "Сохранить SVG как" #: src/utils/TranslationUtils.gd msgid "Close tabs to the left" @@ -1035,18 +1036,16 @@ msgid "Optimize" msgstr "Оптимизировать" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Optimize SVG" -msgstr "Оптимизировать" +msgstr "Оптимизировать SVG" #: src/utils/TranslationUtils.gd msgid "Copy all text" msgstr "Скопировать весь текст" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Copy the SVG text" -msgstr "Скопировать весь текст" +msgstr "Скопировать SVG текст" #: src/utils/TranslationUtils.gd msgid "Reset SVG" @@ -1105,7 +1104,6 @@ msgid "Delete the selection" msgstr "Удалить все выбранные теги" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move up" msgstr "Подвинуть вверх" @@ -1114,7 +1112,6 @@ msgid "Move the selection up" msgstr "Подвинуть выбранное вверх" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move down" msgstr "Подвинуть вниз" @@ -1218,6 +1215,10 @@ msgstr "Проверить обновления" msgid "Quit the application" msgstr "Выйти из приложения" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Подвинуть до" @@ -1264,16 +1265,28 @@ msgstr "Абсолютно" #: src/utils/TranslationUtils.gd msgid "Code editor" -msgstr "" +msgstr "Редактор кода" #: src/utils/TranslationUtils.gd msgid "Inspector" -msgstr "" +msgstr "Инспектор" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Viewport" -msgstr "Просмотр" +msgstr "Окно просмотра" + +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Выбрать изображение" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "Выбрать {format} файл" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "Сохранить {format} файл" #: src/utils/TranslationUtils.gd msgid "" @@ -1287,6 +1300,18 @@ msgstr "" msgid "The file extension is empty. Only {extension_list} files are supported." msgstr "Расширение файла пустое. Поддерживаются только {extension_list} файлы." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Сохранить .\"{format}\" файл" + +#~ msgid "Load an image file" +#~ msgstr "Загрузить изображение" + +#~ msgid "Import a {extension} file" +#~ msgstr "Импортировать {extension} файл" + +#~ msgid "Select an SVG" +#~ msgstr "Выбрать SVG" + #~ msgid "Show reference" #~ msgstr "Показать референс-изображение" diff --git a/translations/uk.po b/translations/uk.po index 55d4158..a860f96 100644 --- a/translations/uk.po +++ b/translations/uk.po @@ -10,7 +10,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.5\n" +"X-Generator: Poedit 3.6\n" msgid "translation-credits" msgstr "volkov" @@ -85,9 +85,8 @@ msgid "Restore" msgstr "Відновити" #: src/autoload/State.gd -#, fuzzy msgid "View in Inspector" -msgstr "Переглянути списком" +msgstr "Переглянути в інспекторі" #: src/autoload/State.gd msgid "Convert To" @@ -102,12 +101,11 @@ msgid "The last edited state of this tab could not be found." msgstr "Останній редагований стан цієї вкладки не може бути знайдено." #: src/autoload/State.gd -#, fuzzy msgid "" "The tab is bound to the file path {file_path}. Do you want to restore the " "SVG from this path?" msgstr "" -"Ця вкладка пов'язана з шляхом до файлу {file_path}. Бажаєте відновити з " +"Ця вкладка пов'язана з шляхом до файлу {file_path}. Бажаєте відновити SVG з " "цього шляху?" #: src/config_classes/Formatter.gd @@ -248,6 +246,15 @@ msgstr "Зовнішній вигляд" msgid "Snap size" msgstr "Розмір прилипання" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "Завантажити еталонне зображення" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -322,22 +329,6 @@ msgstr "Перемикнути видимість прихованих файл msgid "Search files" msgstr "Пошук файлів" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "Зберегти SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "Обрати SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "Обрати XML файл" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "Обрати зображення" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "Обрати" @@ -414,13 +405,14 @@ msgstr "Синтаксична помилка" msgid "Add element" msgstr "Додати елемент" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" -msgstr "" +msgstr "Виключені" #: src/ui_parts/layout_popup.gd msgid "Drag and drop to change the layout" -msgstr "" +msgstr "Перетягніть і опустіть, щоб змінити макет" #: src/ui_parts/mac_menu.gd src/ui_parts/settings_menu.gd msgid "File" @@ -446,7 +438,7 @@ msgstr "Прилипання" msgid "Formatting" msgstr "Форматування" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "Палітри" @@ -458,6 +450,10 @@ msgstr "Клавіатурні скорочення" msgid "Theming" msgstr "Тема" +#: src/ui_parts/settings_menu.gd +msgid "Tab bar" +msgstr "Вкладка" + #: src/ui_parts/settings_menu.gd msgid "Other" msgstr "Інше" @@ -490,6 +486,7 @@ msgstr "Колір коментаря" msgid "Text color" msgstr "Колір тексту" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "Колір CDATA" @@ -498,6 +495,7 @@ msgstr "Колір CDATA" msgid "Error color" msgstr "Колір помилки" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "Колір ручки редагування" @@ -531,9 +529,8 @@ msgid "Background color" msgstr "Колір фону" #: src/ui_parts/settings_menu.gd -#, fuzzy msgid "Grid color" -msgstr "Колір валідності" +msgstr "Колір ґратки" #: src/ui_parts/settings_menu.gd msgid "Valid color" @@ -549,7 +546,7 @@ msgstr "Пристрої вводу" #: src/ui_parts/settings_menu.gd msgid "Close tabs with middle mouse button" -msgstr "" +msgstr "Закривати вкладки при натисканні середньої кнопки миші" #: src/ui_parts/settings_menu.gd msgid "Invert zoom direction" @@ -575,6 +572,7 @@ msgstr "Використовувати рідний файловий діало msgid "Sync window title to file name" msgstr "Синхронізувати заголовок вікна з назвою поточного файлу" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "Розмір ручок редагування" @@ -607,10 +605,12 @@ msgstr "Нова палітра" msgid "New palette from XML" msgstr "Нова палітра з XML" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd msgid "Editor formatter" msgstr "Форматер редактору" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd msgid "Export formatter" msgstr "Форматер експорту" @@ -719,6 +719,14 @@ msgstr "Список трансформацій" msgid "Remove unnecessary parameters" msgstr "Видалити необов'язкові параметри" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" +"Якщо увімкнено - клацання на вкладку середньою кнопкою миші закриє її. Якщо " +"вимкнено - фокус буде замінено на неї." + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "Міняє напрям гортання при масштабуванні." @@ -733,10 +741,9 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "" -"Якщо увімкнено, гортання буде рухати вікно перегляду. Щоб масштабувати, " +"Якщо увімкнено - гортання буде рухати вікно перегляду. Щоб масштабувати, " "затисніть CTRL доки гортаєте." #: src/ui_parts/settings_menu.gd @@ -750,11 +757,11 @@ msgstr "" #: src/ui_parts/settings_menu.gd msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "" -"Якщо вимкнено, заголовок вікна залишиться \"GodSVG\" незалежно від поточного " -"файлу." +"Якщо вимкнено - заголовок вікна залишиться як \"GodSVG\", не включаючи назву " +"поточного файлу." #: src/ui_parts/settings_menu.gd msgid "Changes the visual size and grabbing area of handles." @@ -792,15 +799,14 @@ msgstr "Гортати вперед" msgid "This SVG is not bound to a file location yet." msgstr "Це SVG зображення поки що не пов'язано з розташуванням файла." -#: src/ui_parts/update_menu.gd -#, fuzzy -msgid "Show prereleases" -msgstr "Включати тестові версії" - #: src/ui_parts/update_menu.gd msgid "Retry" msgstr "Спробувати ще раз" +#: src/ui_parts/update_menu.gd +msgid "Show prereleases" +msgstr "Показати тестові версії" + #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "Поточна версія" @@ -809,27 +815,34 @@ msgstr "Поточна версія" msgid "Retrieving information..." msgstr "Отримуємо інформацію..." +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "Не вдалося перевірити оновлення" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "Показати тестові версії" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG оновлено до останньої версії." #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "Нові версії" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "Створити" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "Шукати колір" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "Кольорова піпетка" @@ -946,18 +959,6 @@ msgstr "Нова трансформація" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG не може розпізнати цей атрибут" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "Зберегти .\"{format}\" файл" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "Завантажити файл зображення" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "Імпортувати {extension} файл" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "Цей файл неможливо відкрити." @@ -967,26 +968,24 @@ msgid "Check if the file still exists in the selected file path." msgstr "Перевірити, чи файл все щє існує по обраному шляху." #: src/utils/FileUtils.gd -#, fuzzy msgid "Save the file?" -msgstr "Зберегти .\"{format}\" файл" +msgstr "Зберегти файл?" #: src/utils/FileUtils.gd -#, fuzzy msgid "Do you want to save this file?" -msgstr "Ви дійсно бажаєте продовжити?" +msgstr "Ви бажаєте зберегти цей файл?" #: src/utils/FileUtils.gd msgid "Save the changes?" -msgstr "" +msgstr "Зберегти зміни?" #: src/utils/FileUtils.gd msgid "Your changes will be lost if you don't save them." -msgstr "" +msgstr "Ваші зміни буде втрачено, якщо ви не збережете їх." #: src/utils/FileUtils.gd msgid "Don't save" -msgstr "" +msgstr "Не зберігати" #: src/utils/FileUtils.gd msgid "The imported file is already being edited inside GodSVG." @@ -995,15 +994,20 @@ msgstr "Імпортований файл вже редагується в GodSV #: src/utils/FileUtils.gd msgid "If you want to revert your edits since the last save, use {reset_svg}." msgstr "" +"Якщо ви бажаєте повернути свої зміни з останнього збереження, використовуйте " +"{reset_svg}." #: src/utils/FileUtils.gd msgid "Do you want to save the changes made to {file_name}?" -msgstr "" +msgstr "Чи бажаєте зберегти зміни в {file_name}?" + +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "Зберегти SVG" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Save SVG as" -msgstr "Зберегти SVG як…" +msgstr "Зберегти SVG як" #: src/utils/TranslationUtils.gd msgid "Close tabs to the left" @@ -1034,18 +1038,16 @@ msgid "Optimize" msgstr "Оптимізувати" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Optimize SVG" -msgstr "Оптимізувати" +msgstr "Оптимізувати SVG" #: src/utils/TranslationUtils.gd msgid "Copy all text" msgstr "Скопіювати весь текст" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Copy the SVG text" -msgstr "Скопіювати весь текст" +msgstr "Скопіювати SVG текст" #: src/utils/TranslationUtils.gd msgid "Reset SVG" @@ -1104,7 +1106,6 @@ msgid "Delete the selection" msgstr "Видалити усі обрані теги" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move up" msgstr "Пересунути вгору" @@ -1113,7 +1114,6 @@ msgid "Move the selection up" msgstr "Пересунути обране вгору" #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Move down" msgstr "Пересунути вниз" @@ -1218,6 +1218,10 @@ msgstr "Перевірити оновлення" msgid "Quit the application" msgstr "Вийти із додатку" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "Пересунути до" @@ -1264,16 +1268,28 @@ msgstr "Абсолютно" #: src/utils/TranslationUtils.gd msgid "Code editor" -msgstr "" +msgstr "Редактор коду" #: src/utils/TranslationUtils.gd msgid "Inspector" -msgstr "" +msgstr "Інспектор" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd -#, fuzzy msgid "Viewport" -msgstr "Перегляд" +msgstr "Вікно перегляду" + +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "Обрати зображення" + +#: src/utils/TranslationUtils.gd +msgid "Select an {format} file" +msgstr "Обрати {format} файл" + +#: src/utils/TranslationUtils.gd +msgid "Save the {format} file" +msgstr "Зберегти {format} файл" #: src/utils/TranslationUtils.gd msgid "" @@ -1287,6 +1303,18 @@ msgstr "" msgid "The file extension is empty. Only {extension_list} files are supported." msgstr "Розширення файлу порожнє. Тільки {extension_list} файли підтримуються." +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "Зберегти .\"{format}\" файл" + +#~ msgid "Load an image file" +#~ msgstr "Завантажити файл зображення" + +#~ msgid "Import a {extension} file" +#~ msgstr "Імпортувати {extension} файл" + +#~ msgid "Select an SVG" +#~ msgstr "Обрати SVG" + #~ msgid "Show reference" #~ msgstr "Показати еталонне зображення" diff --git a/translations/zh_CN.po b/translations/zh_CN.po index a9aabda..5c31663 100644 --- a/translations/zh_CN.po +++ b/translations/zh_CN.po @@ -244,6 +244,15 @@ msgstr "显示" msgid "Snap size" msgstr "吸附大小" +#: src/ui_parts/display.gd +#, fuzzy +msgid "Paste reference image" +msgstr "加载参考图像" + +#: src/ui_parts/donate_menu.gd +msgid "Links to donation platforms" +msgstr "" + #: src/ui_parts/donate_menu.gd src/ui_parts/export_menu.gd #: src/ui_parts/import_warning_menu.gd src/ui_widgets/choose_name_dialog.gd #: src/ui_widgets/confirm_dialog.gd src/ui_widgets/options_dialog.gd @@ -318,22 +327,6 @@ msgstr "切换隐藏文件可见性" msgid "Search files" msgstr "搜索文件" -#: src/ui_parts/good_file_dialog.gd src/utils/TranslationUtils.gd -msgid "Save SVG" -msgstr "保存 SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an SVG" -msgstr "选择 SVG" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an XML file" -msgstr "选择 XML 文件" - -#: src/ui_parts/good_file_dialog.gd -msgid "Select an image" -msgstr "选择图像" - #: src/ui_parts/good_file_dialog.gd msgid "Select" msgstr "选择" @@ -408,6 +401,7 @@ msgstr "语法错误" msgid "Add element" msgstr "添加元素" +#. Refers to the zero, one, or multiple UI parts to not be shown in the final layout. It's of plural cardinality. #: src/ui_parts/layout_popup.gd msgid "Excluded" msgstr "" @@ -440,7 +434,7 @@ msgstr "吸附" msgid "Formatting" msgstr "格式化" -#: src/ui_parts/settings_menu.gd src/ui_widgets/color_popup.gd +#: src/ui_parts/settings_menu.gd src/ui_widgets/color_field_popup.gd msgid "Palettes" msgstr "调色盘" @@ -484,6 +478,7 @@ msgstr "注释颜色" msgid "Text color" msgstr "文本颜色" +#. CDATA shouldn't be translated. It's a type of XML section. #: src/ui_parts/settings_menu.gd msgid "CDATA color" msgstr "CDATA 颜色" @@ -492,6 +487,7 @@ msgstr "CDATA 颜色" msgid "Error color" msgstr "错误颜色" +#. Refers to the colors of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle colors" msgstr "拖拽框颜色" @@ -569,6 +565,7 @@ msgstr "使用系统自带文件选择窗口" msgid "Sync window title to file name" msgstr "同步窗口标题为文件名" +#. Refers to the size of the draggable handles. #: src/ui_parts/settings_menu.gd msgid "Handle size" msgstr "拖拽框大小" @@ -602,11 +599,13 @@ msgstr "新建调色盘" msgid "New palette from XML" msgstr "从 XML 创建新调色盘" +#. Refers to the formatter used for GodSVG's code editor. #: src/ui_parts/settings_menu.gd #, fuzzy msgid "Editor formatter" msgstr "编辑器格式" +#. Refers to the formatter used when exporting. #: src/ui_parts/settings_menu.gd #, fuzzy msgid "Export formatter" @@ -713,6 +712,12 @@ msgstr "变换列表" msgid "Remove unnecessary parameters" msgstr "移除不必要的参数" +#: src/ui_parts/settings_menu.gd +msgid "" +"If turned on, clicking on a tab with the middle mouse button closes the tab. " +"If turned off, it focuses the tab instead." +msgstr "" + #: src/ui_parts/settings_menu.gd msgid "Swaps the scroll directions for zooming in and zooming out." msgstr "" @@ -724,9 +729,9 @@ msgid "" msgstr "" #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned on, scrolling will pan the view. To zoom, hold CTRL while " -"scrolling." +"If turned on, scrolling pans the view. To zoom, hold CTRL while scrolling." msgstr "如果启用,滚动鼠标滚轮将移动视图。按住 CTRL 并滚动滚轮以缩放。" #: src/ui_parts/settings_menu.gd @@ -738,9 +743,10 @@ msgstr "" "择窗口。" #: src/ui_parts/settings_menu.gd +#, fuzzy msgid "" -"If turned off, the window title will remain simply \"GodSVG\" regardless of " -"the current file." +"If turned off, the window title remains as \"GodSVG\" without including the " +"current file." msgstr "如果禁用,不论当前打开的文件是什么,窗口标题都将固定为 “GodSVG”。" #: src/ui_parts/settings_menu.gd @@ -783,15 +789,15 @@ msgstr "" msgid "This SVG is not bound to a file location yet." msgstr "" +#: src/ui_parts/update_menu.gd +msgid "Retry" +msgstr "重试" + #: src/ui_parts/update_menu.gd #, fuzzy msgid "Show prereleases" msgstr "包括预发布版本" -#: src/ui_parts/update_menu.gd -msgid "Retry" -msgstr "重试" - #: src/ui_parts/update_menu.gd msgid "Current Version" msgstr "当前版本" @@ -800,27 +806,34 @@ msgstr "当前版本" msgid "Retrieving information..." msgstr "正在获取信息…" +#. When checking for updates. #: src/ui_parts/update_menu.gd msgid "Update check failed" msgstr "更新检查失败" +#: src/ui_parts/update_menu.gd +#, fuzzy +msgid "View all releases" +msgstr "选择所有元素" + #: src/ui_parts/update_menu.gd msgid "GodSVG is up-to-date." msgstr "GodSVG 是最新版本。" #: src/ui_parts/update_menu.gd -msgid "New versions" +#, fuzzy +msgid "New versions available!" msgstr "新版本" #: src/ui_widgets/choose_name_dialog.gd msgid "Create" msgstr "创建" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Search color" msgstr "搜索颜色" -#: src/ui_widgets/color_popup.gd +#: src/ui_widgets/color_field_popup.gd msgid "Color Picker" msgstr "取色器" @@ -939,18 +952,6 @@ msgstr "新的变换" msgid "GodSVG doesn’t recognize this attribute" msgstr "GodSVG 无法识别该属性" -#: src/utils/FileUtils.gd -msgid "Save the .\"{format}\" file" -msgstr "保存 .\"{format}\" 文件" - -#: src/utils/FileUtils.gd -msgid "Load an image file" -msgstr "加载图像文件" - -#: src/utils/FileUtils.gd -msgid "Import a {extension} file" -msgstr "导入 {extension} 文件" - #: src/utils/FileUtils.gd msgid "The file couldn't be opened." msgstr "无法打开文件。" @@ -993,6 +994,10 @@ msgstr "" msgid "Do you want to save the changes made to {file_name}?" msgstr "" +#: src/utils/TranslationUtils.gd +msgid "Save SVG" +msgstr "保存 SVG" + #: src/utils/TranslationUtils.gd #, fuzzy msgid "Save SVG as" @@ -1217,6 +1222,10 @@ msgstr "检查更新" msgid "Quit the application" msgstr "退出程序" +#: src/utils/TranslationUtils.gd +msgid "Toggle fullscreen" +msgstr "" + #: src/utils/TranslationUtils.gd msgid "Move to" msgstr "移动到" @@ -1269,11 +1278,26 @@ msgstr "" msgid "Inspector" msgstr "" +#. The viewport is the area where the graphic is displayed. In similar applications, it's often called the canvas. #: src/utils/TranslationUtils.gd #, fuzzy msgid "Viewport" msgstr "视图" +#: src/utils/TranslationUtils.gd +msgid "Select an image" +msgstr "选择图像" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Select an {format} file" +msgstr "选择 XML 文件" + +#: src/utils/TranslationUtils.gd +#, fuzzy +msgid "Save the {format} file" +msgstr "保存 .\"{format}\" 文件" + #: src/utils/TranslationUtils.gd msgid "" "The file extension {extension} is unsupported for this operation. Only " @@ -1285,6 +1309,18 @@ msgstr "" msgid "The file extension is empty. Only {extension_list} files are supported." msgstr "文件扩展名为空。只有 {extension_list} 内的文件受支持。" +#~ msgid "Save the .\"{format}\" file" +#~ msgstr "保存 .\"{format}\" 文件" + +#~ msgid "Load an image file" +#~ msgstr "加载图像文件" + +#~ msgid "Import a {extension} file" +#~ msgstr "导入 {extension} 文件" + +#~ msgid "Select an SVG" +#~ msgstr "选择 SVG" + #~ msgid "Show reference" #~ msgstr "显示参考" @@ -1334,9 +1370,6 @@ msgstr "文件扩展名为空。只有 {extension_list} 内的文件受支持。 #~ msgid "Open SVG file" #~ msgstr "打开文件" -#~ msgid "Select all elements" -#~ msgstr "选择所有元素" - #~ msgid "Duplicate the selected elements" #~ msgstr "克隆选中的元素" From 3e576122c59c9c40c9ba26cf564a18efa4900b7b Mon Sep 17 00:00:00 2001 From: Anish Mishra Date: Mon, 12 May 2025 10:14:55 +0530 Subject: [PATCH 2/2] fix update checker --- .github/workflows/build.yml | 2 +- export_presets.cfg | 2 +- src/ui_parts/update_menu.gd | 2 +- src/ui_parts/update_menu.tscn | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88e526d..8f360b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ env: # Commit hash GODOT_COMMIT_HASH: daa4b058ee9272dd4ee9033bb093afb21ad558b7 PROJECT_NAME: GodSVG Mobile - BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes swappy=no build_profile=../godsvg/.github/disabled_classes.build + BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes module_mbedtls_enabled=yes swappy=no build_profile=../godsvg/.github/disabled_classes.build GODOT_REPO: https://github.com/godotengine/godot.git jobs: diff --git a/export_presets.cfg b/export_presets.cfg index 9c14a29..e915d13 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -129,7 +129,7 @@ permissions/install_location_provider=false permissions/install_packages=false permissions/install_shortcut=false permissions/internal_system_window=false -permissions/internet=false +permissions/internet=true permissions/kill_background_processes=false permissions/location_hardware=false permissions/manage_accounts=false diff --git a/src/ui_parts/update_menu.gd b/src/ui_parts/update_menu.gd index 8b174c6..423a425 100644 --- a/src/ui_parts/update_menu.gd +++ b/src/ui_parts/update_menu.gd @@ -84,7 +84,7 @@ _headers: PackedStringArray, body: PackedByteArray) -> void: func display_error_message(msg: String) -> void: status_label.text = Translator.translate("Update check failed") results_panel.show() - results_label.text = "%s\n[url=https://github.com/MewPurPur/GodSVG/releases]%s[/url]" %\ + results_label.text = "%s\n[url=https://github.com/syntaxerror247/GodSVG-Mobile/releases]%s[/url]" %\ [msg, Translator.translate("View all releases")] retry_button.show() diff --git a/src/ui_parts/update_menu.tscn b/src/ui_parts/update_menu.tscn index a99fdf3..3fa8d29 100644 --- a/src/ui_parts/update_menu.tscn +++ b/src/ui_parts/update_menu.tscn @@ -4,16 +4,16 @@ [ext_resource type="Texture2D" uid="uid://cvh3kwbucf2n1" path="res://assets/icons/Reload.svg" id="2_x5og6"] [node name="UpdateMenu" type="PanelContainer"] -custom_minimum_size = Vector2(300, 160) +custom_minimum_size = Vector2(330, 300) anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -89.5 -offset_top = -54.5 -offset_right = 89.5 -offset_bottom = 54.5 +offset_left = -165.0 +offset_top = -150.0 +offset_right = 165.0 +offset_bottom = 150.0 grow_horizontal = 2 grow_vertical = 2 theme_type_variation = &"OverlayPanel" @@ -41,6 +41,7 @@ disabled = true [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer"] layout_mode = 2 +size_flags_vertical = 3 [node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/VBoxContainer"] layout_mode = 2