Fix the file save dialog and translations

This commit is contained in:
Přemysl Eric Janouch 2021-10-22 22:23:59 +02:00
parent 885ccb46a3
commit 2d103ed454
Signed by: p
GPG Key ID: A0420B94F92B9493
8 changed files with 103 additions and 91 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2010 - 2018, Přemysl Eric Janouch <p@janouch.name> Copyright (c) 2010 - 2021, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted. purpose with or without fee is hereby granted.

View File

@ -6,27 +6,27 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: logdiag\n" "Project-Id-Version: logdiag\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/logdiag/issues\n"
"POT-Creation-Date: 2018-06-27 04:52+0200\n" "POT-Creation-Date: 2021-10-22 22:16+0200\n"
"PO-Revision-Date: 2018-06-25 04:02+0200\n" "PO-Revision-Date: 2021-10-22 22:21+0200\n"
"Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n" "Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n"
"Language-Team: Czech <cs@li.org>\n" "Language-Team: Czech <cs@li.org>\n"
"Language: cs\n" "Language: cs\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.8\n" "X-Generator: Poedit 3.0\n"
#: ../src/ld-window-main.c:931 #: ../src/ld-window-main.c:937
#, c-format #, c-format
msgid "%d%%" msgid "%d%%"
msgstr "%d %%" msgstr "%d %%"
#: ../src/logdiag.c:146 #: ../src/logdiag.c:147
msgid "- Schematic editor" msgid "- Schematic editor"
msgstr "- Editor schémat" msgstr "- Editor schémat"
#: ../src/ld-window-main.c:855 #: ../src/ld-window-main.c:861
msgid "Close _without Saving" msgid "Close _without Saving"
msgstr "Zavřít _bez uložení" msgstr "Zavřít _bez uložení"
@ -59,7 +59,7 @@ msgstr "Nelze otevřít soubor"
msgid "Failed to save the diagram" msgid "Failed to save the diagram"
msgstr "Nelze uložit diagram" msgstr "Nelze uložit diagram"
#: ../src/ld-window-main.c:853 #: ../src/ld-window-main.c:859
msgid "If you don't save, changes will be permanently lost." msgid "If you don't save, changes will be permanently lost."
msgstr "Pokud je neuložíte, budou změny navždy ztraceny." msgstr "Pokud je neuložíte, budou změny navždy ztraceny."
@ -87,7 +87,7 @@ msgstr "Provede posledně vrácenou akci"
msgid "Reset zoom level back to the default" msgid "Reset zoom level back to the default"
msgstr "Vrátí přiblížení na výchozí hodnotu" msgstr "Vrátí přiblížení na výchozí hodnotu"
#: ../src/ld-window-main.c:790 #: ../src/ld-window-main.c:792
msgid "Save As..." msgid "Save As..."
msgstr "Uložit jako..." msgstr "Uložit jako..."
@ -97,17 +97,15 @@ msgstr "Uložit _jako..."
#: ../src/ld-window-main.c:623 #: ../src/ld-window-main.c:623
#, c-format #, c-format
msgid "" msgid "Save the changes to diagram \"%s\" before closing it and creating a new one?"
"Save the changes to diagram \"%s\" before closing it and creating a new one?"
msgstr "Uložit změny v diagramu \"%s\" před jeho zavřením a vytvořením nového?" msgstr "Uložit změny v diagramu \"%s\" před jeho zavřením a vytvořením nového?"
#: ../src/ld-window-main.c:755 #: ../src/ld-window-main.c:755
#, c-format #, c-format
msgid "" msgid "Save the changes to diagram \"%s\" before closing it and opening another one?"
"Save the changes to diagram \"%s\" before closing it and opening another one?"
msgstr "Uložit změny v diagramu \"%s\" před jeho zavřením a otevřením jiného?" msgstr "Uložit změny v diagramu \"%s\" před jeho zavřením a otevřením jiného?"
#: ../src/ld-window-main.c:893 #: ../src/ld-window-main.c:899
#, c-format #, c-format
msgid "Save the changes to diagram \"%s\" before closing?" msgid "Save the changes to diagram \"%s\" before closing?"
msgstr "Uložit změny v diagramu \"%s\" před jeho zavřením?" msgstr "Uložit změny v diagramu \"%s\" před jeho zavřením?"
@ -160,6 +158,10 @@ msgstr "Vrátí poslední akci"
msgid "Unsaved Diagram" msgid "Unsaved Diagram"
msgstr "Neuložený diagram" msgstr "Neuložený diagram"
#: ../src/ld-window-main.c:806
msgid "Untitled diagram"
msgstr "Nepojmenovaný diagram"
#: ../src/ld-window-main.c:171 #: ../src/ld-window-main.c:171
msgid "Zoom _Out" msgid "Zoom _Out"
msgstr "_Oddálit" msgstr "_Oddálit"
@ -240,7 +242,7 @@ msgstr "_Zobrazení"
msgid "_Zoom In" msgid "_Zoom In"
msgstr "_Přiblížit" msgstr "_Přiblížit"
#: ../src/ld-window-main.c:977 #: ../src/ld-window-main.c:983
msgid "translator-credits" msgid "translator-credits"
msgstr "Přemysl Eric Janouch <p@janouch.name>" msgstr "Přemysl Eric Janouch <p@janouch.name>"

View File

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: logdiag\n" "Project-Id-Version: logdiag\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/logdiag/issues\n"
"POT-Creation-Date: 2018-06-27 04:52+0200\n" "POT-Creation-Date: 2021-10-22 22:16+0200\n"
"PO-Revision-Date: 2018-06-25 04:11+0200\n" "PO-Revision-Date: 2018-06-25 04:11+0200\n"
"Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n" "Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
@ -17,16 +17,16 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.8\n" "X-Generator: Poedit 2.0.8\n"
#: ../src/ld-window-main.c:931 #: ../src/ld-window-main.c:937
#, c-format #, c-format
msgid "%d%%" msgid "%d%%"
msgstr "%d %%" msgstr "%d %%"
#: ../src/logdiag.c:146 #: ../src/logdiag.c:147
msgid "- Schematic editor" msgid "- Schematic editor"
msgstr "- Schema Editor" msgstr "- Schema Editor"
#: ../src/ld-window-main.c:855 #: ../src/ld-window-main.c:861
msgid "Close _without Saving" msgid "Close _without Saving"
msgstr "Schließen _ohne Speichern" msgstr "Schließen _ohne Speichern"
@ -61,7 +61,7 @@ msgstr "Fehler beim Öffnen der Datei"
msgid "Failed to save the diagram" msgid "Failed to save the diagram"
msgstr "Fehler beim Speichern des Diagramms" msgstr "Fehler beim Speichern des Diagramms"
#: ../src/ld-window-main.c:853 #: ../src/ld-window-main.c:859
msgid "If you don't save, changes will be permanently lost." msgid "If you don't save, changes will be permanently lost."
msgstr "Wenn Sie nicht speichern, gehen alle Änderungen verloren." msgstr "Wenn Sie nicht speichern, gehen alle Änderungen verloren."
@ -89,7 +89,7 @@ msgstr "Letzte nicht abgeschlossene Aktion wiederholen"
msgid "Reset zoom level back to the default" msgid "Reset zoom level back to the default"
msgstr "Zoom Bereich zurücksetzen" msgstr "Zoom Bereich zurücksetzen"
#: ../src/ld-window-main.c:790 #: ../src/ld-window-main.c:792
msgid "Save As..." msgid "Save As..."
msgstr "Speichern unter..." msgstr "Speichern unter..."
@ -111,7 +111,7 @@ msgstr ""
"Änderungen im Diagramm \"%s\" speichern bevor es beendet und ein Weiteres " "Änderungen im Diagramm \"%s\" speichern bevor es beendet und ein Weiteres "
"geöffnet wird?" "geöffnet wird?"
#: ../src/ld-window-main.c:893 #: ../src/ld-window-main.c:899
#, c-format #, c-format
msgid "Save the changes to diagram \"%s\" before closing?" msgid "Save the changes to diagram \"%s\" before closing?"
msgstr "Änderungen im Diagramm \"%s\" vor dem Schließen speichern?" msgstr "Änderungen im Diagramm \"%s\" vor dem Schließen speichern?"
@ -164,6 +164,11 @@ msgstr "Letzte Aktion rückgangig machen"
msgid "Unsaved Diagram" msgid "Unsaved Diagram"
msgstr "Ungespeichertes Diagramm" msgstr "Ungespeichertes Diagramm"
#: ../src/ld-window-main.c:806
#, fuzzy
msgid "Untitled diagram"
msgstr "Ungespeichertes Diagramm"
#: ../src/ld-window-main.c:171 #: ../src/ld-window-main.c:171
msgid "Zoom _Out" msgid "Zoom _Out"
msgstr "Zoom _heraus" msgstr "Zoom _heraus"
@ -244,7 +249,7 @@ msgstr "_Ansicht"
msgid "_Zoom In" msgid "_Zoom In"
msgstr "_Hineinzoomen" msgstr "_Hineinzoomen"
#: ../src/ld-window-main.c:977 #: ../src/ld-window-main.c:983
msgid "translator-credits" msgid "translator-credits"
msgstr "Andy J." msgstr "Andy J."

View File

@ -7,8 +7,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: logdiag 0.2.0\n" "Project-Id-Version: logdiag 0.2.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/logdiag/issues\n"
"POT-Creation-Date: 2018-06-27 04:52+0200\n" "POT-Creation-Date: 2021-10-22 22:16+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -206,29 +206,33 @@ msgstr ""
msgid "Open..." msgid "Open..."
msgstr "" msgstr ""
#: ../src/ld-window-main.c:790 #: ../src/ld-window-main.c:792
msgid "Save As..." msgid "Save As..."
msgstr "" msgstr ""
#: ../src/ld-window-main.c:853 #: ../src/ld-window-main.c:806
msgid "Untitled diagram"
msgstr ""
#: ../src/ld-window-main.c:859
msgid "If you don't save, changes will be permanently lost." msgid "If you don't save, changes will be permanently lost."
msgstr "" msgstr ""
#: ../src/ld-window-main.c:855 #: ../src/ld-window-main.c:861
msgid "Close _without Saving" msgid "Close _without Saving"
msgstr "" msgstr ""
#: ../src/ld-window-main.c:893 #: ../src/ld-window-main.c:899
#, c-format #, c-format
msgid "Save the changes to diagram \"%s\" before closing?" msgid "Save the changes to diagram \"%s\" before closing?"
msgstr "" msgstr ""
#: ../src/ld-window-main.c:931 #: ../src/ld-window-main.c:937
#, c-format #, c-format
msgid "%d%%" msgid "%d%%"
msgstr "" msgstr ""
#: ../src/ld-window-main.c:977 #: ../src/ld-window-main.c:983
msgid "translator-credits" msgid "translator-credits"
msgstr "" msgstr ""
@ -236,7 +240,7 @@ msgstr ""
msgid "[FILE...]" msgid "[FILE...]"
msgstr "" msgstr ""
#: ../src/logdiag.c:146 #: ../src/logdiag.c:147
msgid "- Schematic editor" msgid "- Schematic editor"
msgstr "" msgstr ""

View File

@ -1,36 +1,21 @@
#!/bin/bash #!/bin/sh -e
# This script makes a translation template # This shell script generates the translation template.
# The reason for this not being inside CMakeLists.txt #
# is that the translator should not need to run # The reason for this not being inside CMakeLists.txt is that the translator
# the whole configure process to get this single stupid file. # should not need to run the whole configuration process just to get this file.
dir=$(dirname $0)
# Source files export LC_ALL=C
SOURCES=$(echo ../{src,liblogdiag}/*.c)
# Get the package name from CMakeLists.txt re='^[ \t]*project *( *\([^ \t)]\{1,\}\) \{1,\}VERSION \{1,\}\([^ \t)]\{1,\}\).*'
PACKAGE=$(sed -n '/^[ \t]*[pP][rR][oO][jJ][eE][cC][tT][ \t]*([ \t]*\([^ \t)]\{1,\}\).*).*/{s//\1/p;q}' \ package=$(sed -n "s/$re/\\1/p" "$dir/../CMakeLists.txt")
../CMakeLists.txt) version=$(sed -n "s/$re/\\2/p" "$dir/../CMakeLists.txt")
if [ -z "$package" -o -z "$version" ]; then
# Get the package version from CMakeLists.txt echo "Failed to get information from CMakeLists.txt"
EXP_BEG='/^[ \t]*[sS][eE][tT][ \t]*([ \t]*project_VERSION_' exit 1
EXP_END='[ \t]\{1,\}"\{0,1\}\([^)"]\{1,\}\)"\{0,1\}).*/{s//\1/p;q}'
MAJOR=$(sed -n "${EXP_BEG}MAJOR${EXP_END}" ../CMakeLists.txt)
MINOR=$(sed -n "${EXP_BEG}MINOR${EXP_END}" ../CMakeLists.txt)
PATCH=$(sed -n "${EXP_BEG}PATCH${EXP_END}" ../CMakeLists.txt)
if [ "$MAJOR" != "" ]; then
VERSION=$MAJOR
if [ "$MINOR" != "" ]; then
VERSION=$VERSION.$MINOR
if [ "$PATCH" != "" ]; then
VERSION=$VERSION.$PATCH
fi
fi
fi fi
# Finally make the template xgettext -LC -k_ -kN_ "$dir"/../{src,liblogdiag}/*.c -o "$dir/$package.pot" \
xgettext -LC -k_ -kN_ $SOURCES -o "$PACKAGE".pot \ --package-name="$package" --package-version="$version" \
--package-name="$PACKAGE" --package-version="$VERSION" \ --copyright-holder="Přemysl Eric Janouch" \
--copyright-holder="Přemysl Eric Janouch" --msgid-bugs-address="https://git.janouch.name/p/$package/issues"

View File

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: logdiag\n" "Project-Id-Version: logdiag\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/logdiag/issues\n"
"POT-Creation-Date: 2018-06-27 04:52+0200\n" "POT-Creation-Date: 2021-10-22 22:16+0200\n"
"PO-Revision-Date: 2018-06-25 04:09+0200\n" "PO-Revision-Date: 2018-06-25 04:09+0200\n"
"Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n" "Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n"
"Language-Team: Polish <pl@li.org>\n" "Language-Team: Polish <pl@li.org>\n"
@ -17,16 +17,16 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.8\n" "X-Generator: Poedit 2.0.8\n"
#: ../src/ld-window-main.c:931 #: ../src/ld-window-main.c:937
#, c-format #, c-format
msgid "%d%%" msgid "%d%%"
msgstr "%d%%" msgstr "%d%%"
#: ../src/logdiag.c:146 #: ../src/logdiag.c:147
msgid "- Schematic editor" msgid "- Schematic editor"
msgstr "- Edytor schematów" msgstr "- Edytor schematów"
#: ../src/ld-window-main.c:855 #: ../src/ld-window-main.c:861
msgid "Close _without Saving" msgid "Close _without Saving"
msgstr "Zamknąć _bez zapisu" msgstr "Zamknąć _bez zapisu"
@ -59,7 +59,7 @@ msgstr "Pliku nie da się otworzyć"
msgid "Failed to save the diagram" msgid "Failed to save the diagram"
msgstr "Nie udało się zapisać wykresu" msgstr "Nie udało się zapisać wykresu"
#: ../src/ld-window-main.c:853 #: ../src/ld-window-main.c:859
msgid "If you don't save, changes will be permanently lost." msgid "If you don't save, changes will be permanently lost."
msgstr "Jeżeli nie zapiszesz zmian, zostaną one trwale utracone" msgstr "Jeżeli nie zapiszesz zmian, zostaną one trwale utracone"
@ -87,7 +87,7 @@ msgstr "Powtórzy ostatnio cofniętą akcję"
msgid "Reset zoom level back to the default" msgid "Reset zoom level back to the default"
msgstr "Przywróci poziom zbliżenia na poziom wyjściowy" msgstr "Przywróci poziom zbliżenia na poziom wyjściowy"
#: ../src/ld-window-main.c:790 #: ../src/ld-window-main.c:792
msgid "Save As..." msgid "Save As..."
msgstr "Zapisz jako..." msgstr "Zapisz jako..."
@ -109,7 +109,7 @@ msgid ""
msgstr "" msgstr ""
"Zapisać zmiany w wykresie \"%s\" przed jego zamknięciem i stworzeniem nowego?" "Zapisać zmiany w wykresie \"%s\" przed jego zamknięciem i stworzeniem nowego?"
#: ../src/ld-window-main.c:893 #: ../src/ld-window-main.c:899
#, c-format #, c-format
msgid "Save the changes to diagram \"%s\" before closing?" msgid "Save the changes to diagram \"%s\" before closing?"
msgstr "Zapisać zmiany w wykresie \"%s\" przed jego zamknięciem?" msgstr "Zapisać zmiany w wykresie \"%s\" przed jego zamknięciem?"
@ -162,6 +162,11 @@ msgstr "Cofnie ostatnią akcję"
msgid "Unsaved Diagram" msgid "Unsaved Diagram"
msgstr "Niezapisany Wykres" msgstr "Niezapisany Wykres"
#: ../src/ld-window-main.c:806
#, fuzzy
msgid "Untitled diagram"
msgstr "Niezapisany Wykres"
#: ../src/ld-window-main.c:171 #: ../src/ld-window-main.c:171
msgid "Zoom _Out" msgid "Zoom _Out"
msgstr "_Oddalić widok" msgstr "_Oddalić widok"
@ -242,7 +247,7 @@ msgstr "_Widok"
msgid "_Zoom In" msgid "_Zoom In"
msgstr "_Przybliżyć" msgstr "_Przybliżyć"
#: ../src/ld-window-main.c:977 #: ../src/ld-window-main.c:983
msgid "translator-credits" msgid "translator-credits"
msgstr "Robert Svoboda <ravath@gmail.com>" msgstr "Robert Svoboda <ravath@gmail.com>"

View File

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: logdiag\n" "Project-Id-Version: logdiag\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: https://git.janouch.name/p/logdiag/issues\n"
"POT-Creation-Date: 2018-06-27 04:52+0200\n" "POT-Creation-Date: 2021-10-22 22:16+0200\n"
"PO-Revision-Date: 2018-06-25 04:05+0200\n" "PO-Revision-Date: 2018-06-25 04:05+0200\n"
"Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n" "Last-Translator: Přemysl Eric Janouch <p@janouch.name>\n"
"Language-Team: Slovak <sk@li.org>\n" "Language-Team: Slovak <sk@li.org>\n"
@ -17,16 +17,16 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.8\n" "X-Generator: Poedit 2.0.8\n"
#: ../src/ld-window-main.c:931 #: ../src/ld-window-main.c:937
#, c-format #, c-format
msgid "%d%%" msgid "%d%%"
msgstr "%d %%" msgstr "%d %%"
#: ../src/logdiag.c:146 #: ../src/logdiag.c:147
msgid "- Schematic editor" msgid "- Schematic editor"
msgstr "- Editor schém" msgstr "- Editor schém"
#: ../src/ld-window-main.c:855 #: ../src/ld-window-main.c:861
msgid "Close _without Saving" msgid "Close _without Saving"
msgstr "Zatvoriť _bez uloženia" msgstr "Zatvoriť _bez uloženia"
@ -59,7 +59,7 @@ msgstr "Nepodarilo sa otvoriť súbor"
msgid "Failed to save the diagram" msgid "Failed to save the diagram"
msgstr "Nepodarilo sa uložiť diagram" msgstr "Nepodarilo sa uložiť diagram"
#: ../src/ld-window-main.c:853 #: ../src/ld-window-main.c:859
msgid "If you don't save, changes will be permanently lost." msgid "If you don't save, changes will be permanently lost."
msgstr "Ak ich neuložíte, budú zmeny navždy stratené." msgstr "Ak ich neuložíte, budú zmeny navždy stratené."
@ -87,7 +87,7 @@ msgstr "Vykoná naposledy vrátenú akciu"
msgid "Reset zoom level back to the default" msgid "Reset zoom level back to the default"
msgstr "Vráti priblíženie na východiskovú hodnotu" msgstr "Vráti priblíženie na východiskovú hodnotu"
#: ../src/ld-window-main.c:790 #: ../src/ld-window-main.c:792
msgid "Save As..." msgid "Save As..."
msgstr "Uložiť ako..." msgstr "Uložiť ako..."
@ -108,7 +108,7 @@ msgid ""
"Save the changes to diagram \"%s\" before closing it and opening another one?" "Save the changes to diagram \"%s\" before closing it and opening another one?"
msgstr "Uložiť zmeny v diagrame \"%s\" pred jeho zatvorením a otvorením iného?" msgstr "Uložiť zmeny v diagrame \"%s\" pred jeho zatvorením a otvorením iného?"
#: ../src/ld-window-main.c:893 #: ../src/ld-window-main.c:899
#, c-format #, c-format
msgid "Save the changes to diagram \"%s\" before closing?" msgid "Save the changes to diagram \"%s\" before closing?"
msgstr "Uložiť zmeny v diagrame \"%s\" pred jeho zatvorením?" msgstr "Uložiť zmeny v diagrame \"%s\" pred jeho zatvorením?"
@ -161,6 +161,11 @@ msgstr "Vráti poslednú akciu"
msgid "Unsaved Diagram" msgid "Unsaved Diagram"
msgstr "Neuložený diagram" msgstr "Neuložený diagram"
#: ../src/ld-window-main.c:806
#, fuzzy
msgid "Untitled diagram"
msgstr "Neuložený diagram"
#: ../src/ld-window-main.c:171 #: ../src/ld-window-main.c:171
msgid "Zoom _Out" msgid "Zoom _Out"
msgstr "_Oddialiť" msgstr "_Oddialiť"
@ -241,7 +246,7 @@ msgstr "_Zobrazenie"
msgid "_Zoom In" msgid "_Zoom In"
msgstr "_Priblížiť" msgstr "_Priblížiť"
#: ../src/ld-window-main.c:977 #: ../src/ld-window-main.c:983
msgid "translator-credits" msgid "translator-credits"
msgstr "Miroslav Rigler <itsgoingd@luzer.sk>" msgstr "Miroslav Rigler <itsgoingd@luzer.sk>"

View File

@ -2,7 +2,7 @@
* ld-window-main.c * ld-window-main.c
* *
* This file is a part of logdiag. * This file is a part of logdiag.
* Copyright 2010, 2011, 2012, 2015 Přemysl Eric Janouch * Copyright 2010 - 2021 Přemysl Eric Janouch
* *
* See the file LICENSE for licensing information. * See the file LICENSE for licensing information.
* *
@ -784,6 +784,8 @@ static void
diagram_show_save_as_dialog (LdWindowMain *self) diagram_show_save_as_dialog (LdWindowMain *self)
{ {
GtkWidget *dialog; GtkWidget *dialog;
GtkFileChooser *file_chooser;
gchar *filename;
g_return_if_fail (LD_IS_WINDOW_MAIN (self)); g_return_if_fail (LD_IS_WINDOW_MAIN (self));
@ -796,15 +798,19 @@ diagram_show_save_as_dialog (LdWindowMain *self)
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog),
diagram_get_file_filter ()); diagram_get_file_filter ());
file_chooser = GTK_FILE_CHOOSER (dialog);
if (self->priv->filename) if (self->priv->filename)
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), gtk_file_chooser_set_filename (file_chooser, self->priv->filename);
self->priv->filename); else
{
filename = g_strdup_printf ("%s.ldd", _("Untitled diagram"));
gtk_file_chooser_set_current_name (file_chooser, filename);
g_free (filename);
}
while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
{ {
gchar *filename; filename = gtk_file_chooser_get_filename (file_chooser);
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
if (diagram_save (self, GTK_WINDOW (dialog), filename)) if (diagram_save (self, GTK_WINDOW (dialog), filename))
{ {
diagram_set_filename (self, filename); diagram_set_filename (self, filename);
@ -975,7 +981,7 @@ on_action_about (GtkAction *action, LdWindowMain *self)
"logo-icon-name", PROJECT_NAME, "logo-icon-name", PROJECT_NAME,
"version", PROJECT_VERSION, "version", PROJECT_VERSION,
"translator-credits", _("translator-credits"), "translator-credits", _("translator-credits"),
"copyright", "Copyright 2010 - 2018 Přemysl Eric Janouch", "copyright", "Copyright 2010 - 2021 Přemysl Eric Janouch",
"website", PROJECT_URL, "website", PROJECT_URL,
NULL); NULL);
} }