From e648cece76b671b5b0e165acc6d14178e8de1000 Mon Sep 17 00:00:00 2001 From: auroux Date: Fri, 4 Sep 2009 04:57:12 +0000 Subject: [PATCH] Add internationalization support. --- Makefile.am | 2 +- configure.in | 9 + install-binary | 7 + po/LINGUAS | 2 + po/POTFILES.in | 10 + po/ca.po | 1276 ++++++++++++++++++++++++++++++++++++++++++++ po/fr.po | 1238 ++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 2 +- src/TODO | 19 +- src/main.c | 12 +- src/xo-callbacks.c | 64 +-- src/xo-file.c | 160 +++--- src/xo-file.h | 4 - src/xo-interface.c | 476 ++++++++--------- src/xo-misc.c | 14 +- src/xo-print.c | 9 +- src/xo-shapes.c | 18 +- src/xo-support.c | 6 +- src/xo-support.h | 25 + src/xournal.h | 2 +- x-xoj.desktop | 1 + xournal.desktop | 2 + xournal.gladep | 1 - 23 files changed, 2962 insertions(+), 397 deletions(-) create mode 100644 po/LINGUAS create mode 100644 po/POTFILES.in create mode 100644 po/ca.po create mode 100644 po/fr.po diff --git a/Makefile.am b/Makefile.am index a9303f9..d7aaa75 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = src +SUBDIRS = src po EXTRA_DIST = \ autogen.sh \ diff --git a/configure.in b/configure.in index 597bc6e..a83f7d3 100644 --- a/configure.in +++ b/configure.in @@ -15,8 +15,17 @@ PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) +GETTEXT_PACKAGE=xournal +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) + +dnl Add the languages which your application supports here. +ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`" +AM_GLIB_GNU_GETTEXT + AC_OUTPUT([ Makefile src/Makefile +po/Makefile.in ]) diff --git a/install-binary b/install-binary index 3e8df6a..ff84b0f 100755 --- a/install-binary +++ b/install-binary @@ -27,6 +27,13 @@ if test `id -u` = 0; then ln -s ../pixmaps /usr/local/share/xournal/html-doc/pixmaps fi + echo "Installing translation files in /usr/local/share/locale/*/LC_MESSAGES/xournal.mo..." + for gmofile in po/*.gmo; do + lang=`basename $gmofile .gmo` + install -d /usr/local/share/locale/$lang/LC_MESSAGES + install -c -m 644 $gmofile /usr/local/share/locale/$lang/LC_MESSAGES/xournal.mo + done + echo "Installing desktop files and MIME info in /usr/local/share and /usr/share/mimelnk..." install -d /usr/local/share/icons/hicolor/scalable/apps install -d /usr/local/share/icons/hicolor/scalable/mimetypes diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..3f5b3e5 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,2 @@ +ca +fr diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..013c8a7 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,10 @@ +# List of source files containing translatable strings. + +src/main.c +src/xo-interface.c +src/xo-callbacks.c +src/xo-support.c +src/xo-file.c +src/xo-misc.c +src/xo-print.c +src/xo-paint.c diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 0000000..4ce2e9d --- /dev/null +++ b/po/ca.po @@ -0,0 +1,1276 @@ +# Catalan translations for xournal package +# Traduccions al català del paquet «xournal». +# Copyright (C) 2009 THE xournal'S COPYRIGHT HOLDER +# This file is distributed under the same license as the xournal package. +# David Planella , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: xournal 0.4.2.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-09 21:51+0200\n" +"PO-Revision-Date: 2009-05-09 21:36+0200\n" +"Last-Translator: David Planella \n" +"Language-Team: Catalan\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../xournal.xml.in.h:1 ../x-xoj.desktop.in.h:1 +msgid "Xournal note file" +msgstr "Fitxers de nota del Xournal" + +#: ../xournal.desktop.in.h:1 +msgid "Take handwritten notes" +msgstr "Preneu notes a mà" + +#: ../xournal.desktop.in.h:2 ../maemo/xournal.desktop.in.h:1 +#: ../src/xo-misc.c:1344 +msgid "Xournal" +msgstr "Xournal" + +#: ../maemo/xournal.service.in.h:1 +msgid "com.nokia.xournal" +msgstr "com.nokia.xournal" + +#: ../src/main.c:68 +#, c-format +msgid "" +"Invalid command line parameters.\n" +"Usage: %s [filename.xoj]\n" +msgstr "" + +#: ../src/main.c:241 ../src/xo-callbacks.c:107 ../src/xo-callbacks.c:156 +#: ../src/xo-callbacks.c:3077 +#, c-format +msgid "Error opening file '%s'" +msgstr "S'ha produït un error en obrir el fitxer «%s»" + +#. user aborted on save confirmation +#: ../src/xo-callbacks.c:56 ../src/xo-file.c:669 +msgid "Open PDF" +msgstr "Obre un fitxer PDF" + +#: ../src/xo-callbacks.c:61 ../src/xo-callbacks.c:132 +#: ../src/xo-callbacks.c:230 ../src/xo-callbacks.c:413 +#: ../src/xo-callbacks.c:1489 ../src/xo-file.c:674 +msgid "All files" +msgstr "Tots els fitxers" + +#: ../src/xo-callbacks.c:64 ../src/xo-callbacks.c:416 ../src/xo-file.c:677 +msgid "PDF files" +msgstr "Fitxers PDF" + +#: ../src/xo-callbacks.c:72 ../src/xo-callbacks.c:1512 +msgid "Attach file to the journal" +msgstr "Adjunta el fitxer al diari" + +#. user aborted on save confirmation +#: ../src/xo-callbacks.c:127 +msgid "Open Journal" +msgstr "Obre un diari" + +#: ../src/xo-callbacks.c:135 ../src/xo-callbacks.c:233 +msgid "Xournal files" +msgstr "Fitxers del Xournal" + +#: ../src/xo-callbacks.c:185 ../src/xo-callbacks.c:278 +#, c-format +msgid "Error saving file '%s'" +msgstr "S'ha produït un error en desar el fitxer «%s»" + +#: ../src/xo-callbacks.c:205 +msgid "Save Journal" +msgstr "Desa el diari" + +#: ../src/xo-callbacks.c:259 ../src/xo-callbacks.c:434 +#, c-format +msgid "Should the file %s be overwritten?" +msgstr "Voleu sobreescriure el fitxer %s?" + +#: ../src/xo-callbacks.c:390 +msgid "Export to PDF" +msgstr "Exporta a PDF" + +#: ../src/xo-callbacks.c:447 +#, c-format +msgid "Error creating file '%s'" +msgstr "S'ha produït un error en crear el fitxer «%s»" + +#: ../src/xo-callbacks.c:1484 +msgid "Open Background" +msgstr "Obre un fons" + +#: ../src/xo-callbacks.c:1497 +msgid "Bitmap files" +msgstr "Fitxers de mapa de bits" + +#: ../src/xo-callbacks.c:1505 +msgid "PS/PDF files (as bitmaps)" +msgstr "Fitxers PS/PDF (com a mapes de bits)" + +#: ../src/xo-callbacks.c:1535 +#, c-format +msgid "Error opening background '%s'" +msgstr "S'ha produït un error en obrir el fons «%s»" + +#: ../src/xo-callbacks.c:2087 +msgid "Select Font" +msgstr "Seleccioneu el tipus de lletra" + +#: ../src/xo-callbacks.c:2448 +msgid "" +"Drawing is not allowed on the background layer.\n" +" Switching to Layer 1." +msgstr "" +"No es pot dibuixar a la capa de fons.\n" +" Es commutarà a la capa 1." + +#: ../src/xo-file.c:125 ../src/xo-file.c:159 +#, c-format +msgid "Could not write background '%s'. Continuing anyway." +msgstr "" + +#: ../src/xo-file.c:256 +#, c-format +msgid "Invalid file contents" +msgstr "Els continguts del fitxer no són vàlids" + +#: ../src/xo-file.c:406 +#, c-format +msgid "Could not open background '%s'. Setting background to white." +msgstr "" + +#: ../src/xo-file.c:664 +#, c-format +msgid "" +"Could not open background '%s'.\n" +"Select another file?" +msgstr "" + +#: ../src/xo-file.c:777 +#, c-format +msgid "Could not open background '%s'." +msgstr "" + +#: ../src/xo-file.c:1082 +#, c-format +msgid "Unable to start PDF loader %s." +msgstr "No s'ha pogut iniciar el carregador PDF %s." + +#: ../src/xo-file.c:1470 +msgid " the display resolution, in pixels per inch" +msgstr "" + +#: ../src/xo-file.c:1473 +msgid " the initial zoom level, in percent" +msgstr "" + +#: ../src/xo-file.c:1476 +msgid " maximize the window at startup (true/false)" +msgstr "" + +#: ../src/xo-file.c:1479 +msgid " start in full screen mode (true/false)" +msgstr "" + +#: ../src/xo-file.c:1482 +msgid " the window width in pixels (when not maximized)" +msgstr "" + +#: ../src/xo-file.c:1485 +msgid " the window height in pixels" +msgstr "" + +#: ../src/xo-file.c:1488 +msgid " scrollbar step increment (in pixels)" +msgstr "" + +#: ../src/xo-file.c:1491 +msgid " the step increment in the zoom dialog box" +msgstr "" + +#: ../src/xo-file.c:1494 +msgid " the multiplicative factor for zoom in/out" +msgstr "" + +#: ../src/xo-file.c:1497 +msgid " document view (true = continuous, false = single page)" +msgstr "" + +#: ../src/xo-file.c:1500 +msgid " use XInput extensions (true/false)" +msgstr "" + +#: ../src/xo-file.c:1503 +msgid " discard Core Pointer events in XInput mode (true/false)" +msgstr "" + +#: ../src/xo-file.c:1506 +msgid " always map eraser tip to eraser (true/false)" +msgstr "" + +#: ../src/xo-file.c:1509 +msgid " default path for open/save (leave blank for current directory)" +msgstr "" + +#: ../src/xo-file.c:1512 +msgid " use pressure sensitivity to control pen stroke width (true/false)" +msgstr "" + +#: ../src/xo-file.c:1515 +msgid " minimum width multiplier" +msgstr "" + +#: ../src/xo-file.c:1518 +msgid " maximum width multiplier" +msgstr "" + +#: ../src/xo-file.c:1521 +msgid "" +" interface components from top to bottom\n" +" valid values: drawarea menu main_toolbar pen_toolbar statusbar" +msgstr "" + +#: ../src/xo-file.c:1524 +msgid " interface components in fullscreen mode, from top to bottom" +msgstr "" + +#: ../src/xo-file.c:1527 +msgid " interface has left-handed scrollbar (true/false)" +msgstr "" + +#: ../src/xo-file.c:1530 +msgid " hide some unwanted menu or toolbar items (true/false)" +msgstr "" + +#: ../src/xo-file.c:1533 +msgid "" +" interface items to hide (customize at your own risk!)\n" +" see source file xo-interface.c for a list of item names" +msgstr "" + +#: ../src/xo-file.c:1536 +msgid "" +" highlighter opacity (0 to 1, default 0.5)\n" +" warning: opacity level is not saved in xoj files!" +msgstr "" + +#: ../src/xo-file.c:1539 +msgid " auto-save preferences on exit (true/false)" +msgstr "" + +#: ../src/xo-file.c:1543 +msgid " the default page width, in points (1/72 in)" +msgstr "" + +#: ../src/xo-file.c:1546 +msgid " the default page height, in points (1/72 in)" +msgstr "" + +#: ../src/xo-file.c:1549 +msgid " the default paper color" +msgstr "" + +#: ../src/xo-file.c:1552 +msgid " the default paper style (plain, lined, ruled, or graph)" +msgstr "" + +#: ../src/xo-file.c:1555 +msgid " apply paper style changes to all pages (true/false)" +msgstr "" + +#: ../src/xo-file.c:1558 +msgid " preferred unit (cm, in, px, pt)" +msgstr "" + +#: ../src/xo-file.c:1561 +msgid " include paper ruling when printing or exporting to PDF (true/false)" +msgstr "" + +#: ../src/xo-file.c:1564 +msgid " antialiased bitmap backgrounds (true/false)" +msgstr "" + +#: ../src/xo-file.c:1567 +msgid " progressive scaling of bitmap backgrounds (true/false)" +msgstr "" + +#: ../src/xo-file.c:1570 +msgid "" +" bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)" +msgstr "" + +#: ../src/xo-file.c:1573 +msgid "" +" bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)" +msgstr "" + +#: ../src/xo-file.c:1577 +msgid "" +" selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, " +"hand)" +msgstr "" + +#: ../src/xo-file.c:1580 +msgid " default pen color" +msgstr "" + +#: ../src/xo-file.c:1583 +msgid " default pen thickness (fine = 1, medium = 2, thick = 3)" +msgstr "" + +#: ../src/xo-file.c:1586 +msgid " default pen is in ruler mode (true/false)" +msgstr "" + +#: ../src/xo-file.c:1589 +msgid " default pen is in shape recognizer mode (true/false)" +msgstr "" + +#: ../src/xo-file.c:1592 +msgid " default eraser thickness (fine = 1, medium = 2, thick = 3)" +msgstr "" + +#: ../src/xo-file.c:1595 +msgid " default eraser mode (standard = 0, whiteout = 1, strokes = 2)" +msgstr "" + +#: ../src/xo-file.c:1598 +msgid " default highlighter color" +msgstr "" + +#: ../src/xo-file.c:1601 +msgid " default highlighter thickness (fine = 1, medium = 2, thick = 3)" +msgstr "" + +#: ../src/xo-file.c:1604 +msgid " default highlighter is in ruler mode (true/false)" +msgstr "" + +#: ../src/xo-file.c:1607 +msgid " default highlighter is in shape recognizer mode (true/false)" +msgstr "" + +#: ../src/xo-file.c:1610 +msgid "" +" button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)" +msgstr "" + +#: ../src/xo-file.c:1613 +msgid "" +" button 2 brush linked to primary brush (true/false) (overrides all other " +"settings)" +msgstr "" + +#: ../src/xo-file.c:1616 +msgid " button 2 brush color (for pen or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1620 +msgid " button 2 brush thickness (pen, eraser, or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1624 +msgid " button 2 ruler mode (true/false) (for pen or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1628 +msgid " button 2 shape recognizer mode (true/false) (pen or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1632 +msgid " button 2 eraser mode (eraser only)" +msgstr "" + +#: ../src/xo-file.c:1635 +msgid "" +" button 3 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)" +msgstr "" + +#: ../src/xo-file.c:1638 +msgid "" +" button 3 brush linked to primary brush (true/false) (overrides all other " +"settings)" +msgstr "" + +#: ../src/xo-file.c:1641 +msgid " button 3 brush color (for pen or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1645 +msgid " button 3 brush thickness (pen, eraser, or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1649 +msgid " button 3 ruler mode (true/false) (for pen or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1653 +msgid " button 3 shape recognizer mode (true/false) (pen or highlighter only)" +msgstr "" + +#: ../src/xo-file.c:1657 +msgid " button 3 eraser mode (eraser only)" +msgstr "" + +#: ../src/xo-file.c:1661 +msgid " thickness of the various pens (in points, 1 pt = 1/72 in)" +msgstr "" + +#: ../src/xo-file.c:1667 +msgid " thickness of the various erasers (in points, 1 pt = 1/72 in)" +msgstr "" + +#: ../src/xo-file.c:1672 +msgid " thickness of the various highlighters (in points, 1 pt = 1/72 in)" +msgstr "" + +#: ../src/xo-file.c:1677 +msgid " name of the default font" +msgstr "" + +#: ../src/xo-file.c:1680 +msgid " default font size" +msgstr "" + +#: ../src/xo-file.c:1836 +msgid "" +" Xournal configuration file.\n" +" This file is generated automatically upon saving preferences.\n" +" Use caution when editing this file manually.\n" +msgstr "" + +#. TRANSLATORS: %d refers to the number of pages +#: ../src/xo-misc.c:1215 +#, c-format +msgid " of %d" +msgstr " de %d" + +#: ../src/xo-misc.c:1220 +msgid "Background" +msgstr "Fons" + +#: ../src/xo-misc.c:1228 +#, c-format +msgid "Layer %d" +msgstr "Capa %d" + +#: ../src/xo-misc.c:1350 +#, c-format +msgid "Xournal - %s" +msgstr "Xournal - %s" + +#: ../src/xo-misc.c:1583 +#, c-format +msgid "Save changes to '%s'?" +msgstr "Voleu desar els canvis al fitxer «%s»?" + +#: ../src/xo-misc.c:1584 +msgid "Untitled" +msgstr "Sense títol" + +#: ../src/xo-print.c:1577 +msgid "Preparing print job" +msgstr "S'està preparant la tasca d'impressió" + +#: ../src/xo-print.c:1585 +#, c-format +msgid "Page %d" +msgstr "Pàgina %d" + +#: ../src/xo-print.c:1595 +msgid "Finalizing..." +msgstr "S'està finalitzant..." + +#: ../src/xo-support.c:92 ../src/xo-support.c:116 +#, c-format +msgid "Couldn't find pixmap file: %s" +msgstr "No s'ha trobat el fitxer de mapa de píxels: %s" + +#: ../src/xo-support.c:123 +#, c-format +msgid "Failed to load pixbuf file: %s: %s\n" +msgstr "No s'ha pogut carregar la memòria intermèdia de píxels: %s: %s\n" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:361 +msgid "_File" +msgstr "_Fitxer" + +#: ../src/xo-interface.c:372 +msgid "Annotate PD_F" +msgstr "Fes notes a un fitxer PD_F" + +#: ../src/xo-interface.c:397 +msgid "Recent Doc_uments" +msgstr "Doc_uments recents" + +#: ../src/xo-interface.c:404 +msgid "0" +msgstr "0" + +#: ../src/xo-interface.c:408 +msgid "1" +msgstr "1" + +#: ../src/xo-interface.c:412 +msgid "2" +msgstr "2" + +#: ../src/xo-interface.c:416 +msgid "3" +msgstr "3" + +#: ../src/xo-interface.c:420 +msgid "4" +msgstr "4" + +#: ../src/xo-interface.c:424 +msgid "5" +msgstr "5" + +#: ../src/xo-interface.c:428 +msgid "6" +msgstr "6" + +#: ../src/xo-interface.c:432 +msgid "7" +msgstr "7" + +#: ../src/xo-interface.c:441 +msgid "Print Options" +msgstr "Opcions d'impressió" + +#: ../src/xo-interface.c:456 +msgid "_Export to PDF" +msgstr "_Exporta a PDF" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:473 +msgid "_Edit" +msgstr "_Edita" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:519 +msgid "_View" +msgstr "_Visualitza" + +#: ../src/xo-interface.c:526 +msgid "_Continuous" +msgstr "_Continu" + +#: ../src/xo-interface.c:532 +msgid "_One Page" +msgstr "Pàgina ú_nica" + +#: ../src/xo-interface.c:543 +msgid "Full Screen" +msgstr "Pantalla completa" + +#: ../src/xo-interface.c:555 +msgid "_Zoom" +msgstr "_Ampliació" + +#: ../src/xo-interface.c:583 +msgid "Page _Width" +msgstr "Amplada de la _pàgina" + +#: ../src/xo-interface.c:594 +msgid "_Set Zoom" +msgstr "_Defineix l'ampliació" + +#: ../src/xo-interface.c:603 +msgid "_First Page" +msgstr "Pàgina _inicial" + +#: ../src/xo-interface.c:614 +msgid "_Previous Page" +msgstr "Pàgina an_terior" + +#: ../src/xo-interface.c:625 +msgid "_Next Page" +msgstr "Pàgina _següent" + +#: ../src/xo-interface.c:636 +msgid "_Last Page" +msgstr "Pàgina _final" + +#: ../src/xo-interface.c:652 +msgid "_Show Layer" +msgstr "_Mostra la capa" + +#: ../src/xo-interface.c:660 +msgid "_Hide Layer" +msgstr "_Oculta la capa" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:669 +msgid "_Journal" +msgstr "_Diari" + +#: ../src/xo-interface.c:676 +msgid "New Page _Before" +msgstr "Pàgina nova a_bans" + +#: ../src/xo-interface.c:680 +msgid "New Page _After" +msgstr "Pàgina nova _després" + +#: ../src/xo-interface.c:684 +msgid "New Page At _End" +msgstr "Pàgina nova al _final" + +#: ../src/xo-interface.c:688 +msgid "_Delete Page" +msgstr "_Suprimeix la pàgina" + +#: ../src/xo-interface.c:697 +msgid "_New Layer" +msgstr "_Capa nova" + +#: ../src/xo-interface.c:701 +msgid "Delete La_yer" +msgstr "Suprimeix la ca_pa" + +#: ../src/xo-interface.c:705 +msgid "_Flatten" +msgstr "A_plana" + +#: ../src/xo-interface.c:714 +msgid "Paper Si_ze" +msgstr "Mida del _paper" + +#: ../src/xo-interface.c:718 +msgid "Paper _Color" +msgstr "_Color del paper" + +#: ../src/xo-interface.c:725 +msgid "_white paper" +msgstr "paper _blanc" + +#: ../src/xo-interface.c:731 +msgid "_yellow paper" +msgstr "paper _groc" + +#: ../src/xo-interface.c:737 +msgid "_pink paper" +msgstr "paper _rosa" + +#: ../src/xo-interface.c:743 +msgid "_orange paper" +msgstr "paper _taronja" + +#: ../src/xo-interface.c:749 +msgid "_blue paper" +msgstr "paper _blau" + +#: ../src/xo-interface.c:755 +msgid "_green paper" +msgstr "paper _verd" + +#: ../src/xo-interface.c:761 ../src/xo-interface.c:1032 +msgid "other..." +msgstr "un altre..." + +#: ../src/xo-interface.c:772 +msgid "Paper _Style" +msgstr "E_stil del paper" + +#: ../src/xo-interface.c:779 +msgid "_plain" +msgstr "_llis" + +#: ../src/xo-interface.c:785 +msgid "_lined" +msgstr "_pautat" + +#: ../src/xo-interface.c:791 +msgid "_ruled" +msgstr "_reglat" + +#: ../src/xo-interface.c:797 +msgid "_graph" +msgstr "_quadriculat" + +#: ../src/xo-interface.c:803 ../src/xo-interface.c:1038 +#: ../src/xo-interface.c:1287 ../src/xo-interface.c:1363 +msgid "NA" +msgstr "" + +#: ../src/xo-interface.c:808 +msgid "Apply _To All Pages" +msgstr "Apli_ca a totes les pàgines" + +#: ../src/xo-interface.c:817 +msgid "_Load Background" +msgstr "_Carrega un fons" + +#: ../src/xo-interface.c:825 +msgid "Background Screens_hot" +msgstr "Ca_ptura de pantalla del fons" + +#: ../src/xo-interface.c:834 +msgid "Default _Paper" +msgstr "Paper p_redeterminat" + +#: ../src/xo-interface.c:838 +msgid "Set As De_fault" +msgstr "Defineix com a _predeterminat" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:843 +msgid "_Tools" +msgstr "Ei_nes" + +#: ../src/xo-interface.c:850 ../src/xo-interface.c:1223 +#: ../src/xo-interface.c:1299 +msgid "_Pen" +msgstr "_Llapis" + +#: ../src/xo-interface.c:859 ../src/xo-interface.c:1229 +#: ../src/xo-interface.c:1305 +msgid "_Eraser" +msgstr "_Esborrador" + +#: ../src/xo-interface.c:868 ../src/xo-interface.c:1235 +#: ../src/xo-interface.c:1311 +msgid "_Highlighter" +msgstr "_Marcador fluorescent" + +#: ../src/xo-interface.c:877 ../src/xo-interface.c:1241 +#: ../src/xo-interface.c:1317 +msgid "_Text" +msgstr "_Text" + +#: ../src/xo-interface.c:891 +msgid "_Shape Recognizer" +msgstr "_Reconeixedor de formes" + +#: ../src/xo-interface.c:898 +msgid "Ru_ler" +msgstr "Reg_le" + +#: ../src/xo-interface.c:910 ../src/xo-interface.c:1247 +#: ../src/xo-interface.c:1323 +msgid "Select Re_gion" +msgstr "Selecciona una re_gió" + +#: ../src/xo-interface.c:919 ../src/xo-interface.c:1253 +#: ../src/xo-interface.c:1329 +msgid "Select _Rectangle" +msgstr "Selecciona un _rectangle" + +#: ../src/xo-interface.c:928 ../src/xo-interface.c:1259 +#: ../src/xo-interface.c:1335 +msgid "_Vertical Space" +msgstr "Espai _vertical" + +#: ../src/xo-interface.c:937 ../src/xo-interface.c:1265 +#: ../src/xo-interface.c:1341 +msgid "H_and Tool" +msgstr "_Eina de mà" + +#: ../src/xo-interface.c:950 +msgid "_Color" +msgstr "_Color" + +#: ../src/xo-interface.c:961 +msgid "blac_k" +msgstr "_negre" + +#: ../src/xo-interface.c:967 +msgid "_blue" +msgstr "_blau" + +#: ../src/xo-interface.c:973 +msgid "_red" +msgstr "_vermell" + +#: ../src/xo-interface.c:979 +msgid "_green" +msgstr "v_erd" + +#: ../src/xo-interface.c:985 +msgid "gr_ay" +msgstr "gri_s" + +#: ../src/xo-interface.c:996 +msgid "light bl_ue" +msgstr "blau _cel" + +#: ../src/xo-interface.c:1002 +msgid "light gr_een" +msgstr "ve_rd clar" + +#: ../src/xo-interface.c:1008 +msgid "_magenta" +msgstr "_magenta" + +#: ../src/xo-interface.c:1014 +msgid "_orange" +msgstr "taron_ja" + +#: ../src/xo-interface.c:1020 +msgid "_yellow" +msgstr "gro_c" + +#: ../src/xo-interface.c:1026 +msgid "_white" +msgstr "b_lanc" + +#: ../src/xo-interface.c:1043 +msgid "Pen _Options" +msgstr "_Opcions del llapis" + +#: ../src/xo-interface.c:1050 +msgid "_very fine" +msgstr "mol_t prim" + +#: ../src/xo-interface.c:1056 ../src/xo-interface.c:1087 +#: ../src/xo-interface.c:1135 +msgid "_fine" +msgstr "_prim" + +#: ../src/xo-interface.c:1062 ../src/xo-interface.c:1093 +#: ../src/xo-interface.c:1141 +msgid "_medium" +msgstr "_mitjà" + +#: ../src/xo-interface.c:1068 ../src/xo-interface.c:1099 +#: ../src/xo-interface.c:1147 +msgid "_thick" +msgstr "_gruixut" + +#: ../src/xo-interface.c:1074 +msgid "ver_y thick" +msgstr "_molt gruixut" + +#: ../src/xo-interface.c:1080 +msgid "Eraser Optio_ns" +msgstr "Opcions de l'_esborrador" + +#: ../src/xo-interface.c:1110 +msgid "_standard" +msgstr "e_stàndard" + +#: ../src/xo-interface.c:1116 +msgid "_whiteout" +msgstr "nete_ja" + +#: ../src/xo-interface.c:1122 +msgid "_delete strokes" +msgstr "su_primeix els traços" + +#: ../src/xo-interface.c:1128 +msgid "Highlighter Opt_ions" +msgstr "Opc_ions del marcador fluorescent" + +#: ../src/xo-interface.c:1153 +msgid "Text _Font..." +msgstr "_Tipus de lletra del text..." + +#: ../src/xo-interface.c:1169 +msgid "_Default Pen" +msgstr "_Llapis predeterminat" + +#: ../src/xo-interface.c:1173 +msgid "Default Eraser" +msgstr "Esborrador predeterminat" + +#: ../src/xo-interface.c:1177 +msgid "Default Highlighter" +msgstr "Marcador fluorescent predeterminat" + +#: ../src/xo-interface.c:1181 +msgid "Default Te_xt" +msgstr "Te_xt predeterminat" + +#: ../src/xo-interface.c:1185 +msgid "Set As Default" +msgstr "Defineix-lo com a predeterminat" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:1190 +msgid "_Options" +msgstr "_Opcions" + +#: ../src/xo-interface.c:1197 +msgid "Use _XInput" +msgstr "Utilitza l'_XInput" + +#: ../src/xo-interface.c:1201 +msgid "Discard _Core Events" +msgstr "Descarta els esdeveniments _primaris" + +#. TRANSLATORS: If this option is turned on and the XInput extensions are +#. enabled, then the eraser tip of the tablet's stylus will automatically be +#. remapped to the eraser tool +#: ../src/xo-interface.c:1208 +msgid "_Eraser Tip" +msgstr "Utilitza la goma del _llapis" + +#: ../src/xo-interface.c:1212 +msgid "_Pressure sensitivity" +msgstr "Sensibilitat de la _pressió" + +#: ../src/xo-interface.c:1216 +msgid "Button _2 Mapping" +msgstr "Mapatge del botó _2" + +#: ../src/xo-interface.c:1275 ../src/xo-interface.c:1351 +msgid "_Link to Primary Brush" +msgstr "_Vincula al pinzell primari" + +#: ../src/xo-interface.c:1281 ../src/xo-interface.c:1357 +msgid "_Copy of Current Brush" +msgstr "_Copia el pinzell actual" + +#: ../src/xo-interface.c:1292 +msgid "Button _3 Mapping" +msgstr "Mapatge del botó _3" + +#: ../src/xo-interface.c:1373 +msgid "_Antialiased Bitmaps" +msgstr "Mapes de bits amb antialiàsin_g" + +#: ../src/xo-interface.c:1377 +msgid "_Progressive Backgrounds" +msgstr "Fons _progressius" + +#: ../src/xo-interface.c:1381 +msgid "Print Paper _Ruling" +msgstr "Imprimeix les _línies del paper" + +#: ../src/xo-interface.c:1385 +msgid "Left-Handed Scrollbar" +msgstr "Barra de desplaçament per a esquerrans" + +#: ../src/xo-interface.c:1389 +msgid "Shorten _Menus" +msgstr "Escurça els _menús" + +#: ../src/xo-interface.c:1398 +msgid "A_uto-Save Preferences" +msgstr "Desa les preferències a_utomàticament" + +#: ../src/xo-interface.c:1402 +msgid "_Save Preferences" +msgstr "_Desa les preferències" + +#. TRANSLATORS: This is a top menu +#: ../src/xo-interface.c:1407 +msgid "_Help" +msgstr "A_juda" + +#: ../src/xo-interface.c:1418 +msgid "_About" +msgstr "_Quant a" + +#: ../src/xo-interface.c:1431 +msgid "Save" +msgstr "Desa" + +#: ../src/xo-interface.c:1436 +msgid "New" +msgstr "Nova" + +#: ../src/xo-interface.c:1441 +msgid "Open" +msgstr "Obre" + +#: ../src/xo-interface.c:1454 +msgid "Cut" +msgstr "Retalla" + +#: ../src/xo-interface.c:1459 +msgid "Copy" +msgstr "Copia" + +#: ../src/xo-interface.c:1464 +msgid "Paste" +msgstr "Enganxa" + +#: ../src/xo-interface.c:1477 +msgid "Undo" +msgstr "Desfés" + +#: ../src/xo-interface.c:1482 +msgid "Redo" +msgstr "Refés" + +#: ../src/xo-interface.c:1495 +msgid "First Page" +msgstr "Primera pàgina" + +#: ../src/xo-interface.c:1500 +msgid "Previous Page" +msgstr "Pàgina anterior" + +#: ../src/xo-interface.c:1505 +msgid "Next Page" +msgstr "Pàgina següent" + +#: ../src/xo-interface.c:1510 +msgid "Last Page" +msgstr "Pàgina final" + +#: ../src/xo-interface.c:1523 +msgid "Zoom Out" +msgstr "Redueix" + +#: ../src/xo-interface.c:1528 ../src/xo-interface.c:3046 +msgid "Page Width" +msgstr "Amplada de la pàgina" + +#: ../src/xo-interface.c:1534 +msgid "Zoom In" +msgstr "Amplia" + +#: ../src/xo-interface.c:1539 +msgid "Normal Size" +msgstr "Mida normal" + +#: ../src/xo-interface.c:1544 ../src/xo-interface.c:3005 +msgid "Set Zoom" +msgstr "Definiu l'ampliació" + +#: ../src/xo-interface.c:1553 +msgid "Toggle Fullscreen" +msgstr "Commuta la pantalla completa" + +#: ../src/xo-interface.c:1562 ../src/xo-interface.c:1568 +msgid "Pen" +msgstr "Llapis" + +#: ../src/xo-interface.c:1573 ../src/xo-interface.c:1579 +msgid "Eraser" +msgstr "Esborrador" + +#: ../src/xo-interface.c:1584 ../src/xo-interface.c:1590 +msgid "Highlighter" +msgstr "Marcador fluorescent" + +#: ../src/xo-interface.c:1595 ../src/xo-interface.c:1601 +msgid "Text" +msgstr "Text" + +#: ../src/xo-interface.c:1606 ../src/xo-interface.c:1612 +msgid "Shape Recognizer" +msgstr "Reconeixedor de formes" + +#: ../src/xo-interface.c:1615 ../src/xo-interface.c:1621 +msgid "Ruler" +msgstr "Regle" + +#: ../src/xo-interface.c:1632 ../src/xo-interface.c:1638 +msgid "Select Region" +msgstr "Selecciona una regió" + +#: ../src/xo-interface.c:1643 ../src/xo-interface.c:1649 +msgid "Select Rectangle" +msgstr "Selecciona un rectangle" + +#: ../src/xo-interface.c:1654 ../src/xo-interface.c:1660 +msgid "Vertical Space" +msgstr "Espai vertical" + +#: ../src/xo-interface.c:1665 ../src/xo-interface.c:1671 +msgid "Hand Tool" +msgstr "Eina de mà" + +#: ../src/xo-interface.c:1685 ../src/xo-interface.c:1689 +msgid "Default" +msgstr "Predeterminat" + +#: ../src/xo-interface.c:1693 ../src/xo-interface.c:1696 +msgid "Default Pen" +msgstr "Llapis predeterminat" + +#: ../src/xo-interface.c:1707 ../src/xo-interface.c:1715 +msgid "Fine" +msgstr "Prim" + +#: ../src/xo-interface.c:1720 ../src/xo-interface.c:1728 +msgid "Medium" +msgstr "Mitjà" + +#: ../src/xo-interface.c:1733 ../src/xo-interface.c:1741 +msgid "Thick" +msgstr "Gruixut" + +#: ../src/xo-interface.c:1760 ../src/xo-interface.c:1767 +msgid "Black" +msgstr "Negre" + +#: ../src/xo-interface.c:1772 ../src/xo-interface.c:1779 +msgid "Blue" +msgstr "Blau" + +#: ../src/xo-interface.c:1784 ../src/xo-interface.c:1791 +msgid "Red" +msgstr "Vermell" + +#: ../src/xo-interface.c:1796 ../src/xo-interface.c:1803 +msgid "Green" +msgstr "Verd" + +#: ../src/xo-interface.c:1808 ../src/xo-interface.c:1815 +msgid "Gray" +msgstr "Gris" + +#: ../src/xo-interface.c:1820 ../src/xo-interface.c:1827 +msgid "Light Blue" +msgstr "Blau cel" + +#: ../src/xo-interface.c:1832 ../src/xo-interface.c:1839 +msgid "Light Green" +msgstr "Verd clar" + +#: ../src/xo-interface.c:1844 ../src/xo-interface.c:1851 +msgid "Magenta" +msgstr "Magenta" + +#: ../src/xo-interface.c:1856 ../src/xo-interface.c:1863 +msgid "Orange" +msgstr "Taronja" + +#: ../src/xo-interface.c:1868 ../src/xo-interface.c:1875 +msgid "Yellow" +msgstr "Groc" + +#: ../src/xo-interface.c:1880 ../src/xo-interface.c:1887 +msgid "White" +msgstr "Blanc" + +#: ../src/xo-interface.c:1923 +msgid " Page " +msgstr " Pàgina " + +#: ../src/xo-interface.c:1932 +msgid "Set page number" +msgstr "Defineix el número de pàgina" + +#. TRANSLATORS: This text refers to 'Page m of n', where n is the total +#. number of pages +#: ../src/xo-interface.c:1938 +msgid " of n" +msgstr " de n" + +#: ../src/xo-interface.c:1946 +msgid " Layer: " +msgstr " Capa: " + +#: ../src/xo-interface.c:2827 +msgid "Set Paper Size" +msgstr "Estableix la mida del paper" + +#: ../src/xo-interface.c:2839 +msgid "Standard paper sizes:" +msgstr "Mides de paper estàndard:" + +#: ../src/xo-interface.c:2847 +msgid "A4" +msgstr "A4" + +#: ../src/xo-interface.c:2848 +msgid "A4 (landscape)" +msgstr "A4 (apaïsat)" + +#: ../src/xo-interface.c:2849 +msgid "US Letter" +msgstr "Carta nord-americana" + +#: ../src/xo-interface.c:2850 +msgid "US Letter (landscape)" +msgstr "Carta nord-americana (apaïsat)" + +#: ../src/xo-interface.c:2851 +msgid "Custom" +msgstr "Personalitzada" + +#: ../src/xo-interface.c:2878 +msgid "cm" +msgstr "cm" + +#: ../src/xo-interface.c:2879 +msgid "in" +msgstr "in" + +#: ../src/xo-interface.c:2880 +msgid "pixels" +msgstr "píxels" + +#: ../src/xo-interface.c:2881 +msgid "points" +msgstr "punts" + +#: ../src/xo-interface.c:2941 +msgid "About Xournal" +msgstr "Quant al Xournal" + +#: ../src/xo-interface.c:2957 +msgid "" +"Written by Denis Auroux\n" +" http://xournal.sourceforge.net/ " +msgstr "" +"Creat per Denis Auroux\n" +" http://xournal.sourceforge.net/ " + +#: ../src/xo-interface.c:3021 +msgid "Zoom: " +msgstr "Ampliació: " + +#: ../src/xo-interface.c:3039 +msgid "Normal size (100%)" +msgstr "Mida normal (100%)" + +#: ../src/xo-interface.c:3053 +msgid "Page Height" +msgstr "Alçada de la pàgina" + +#: ../src/xo-shapes.c:413 +#, c-format +msgid "arrow: alpha[%d] = %.1f degrees\n" +msgstr "" + +#: ../src/xo-shapes.c:429 +#, c-format +msgid "linear tolerance: tip[%d] = %.2f\n" +msgstr "" + +#: ../src/xo-shapes.c:436 +#, c-format +msgid "sideways gap tolerance = %.2f\n" +msgstr "" + +#: ../src/xo-shapes.c:442 +#, c-format +msgid "main linear gap = %.2f\n" +msgstr "" + +#: ../src/xo-shapes.c:539 +#, c-format +msgid "" +"Mass=%.0f, Center=(%.1f,%.1f), I=(%.0f,%.0f, %.0f), Rad=%.2f, Det=%.4f \n" +msgstr "" + +#: ../src/xo-shapes.c:549 +#, c-format +msgid "Polygon, %d edges: " +msgstr "" + +#: ../src/xo-shapes.c:551 +#, c-format +msgid "%d-%d (M=%.0f, det=%.4f) " +msgstr "" + +#: ../src/xo-shapes.c:564 +#, c-format +msgid "Queue now has %d + %d edges\n" +msgstr "" + +#: ../src/xo-shapes.c:605 +#, c-format +msgid "Circle score: %.2f\n" +msgstr "" diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..0034cf5 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,1238 @@ +# French translations for xournal package +# This file is distributed under the same license as the xournal package. +# Denis Auroux , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: xournal 0.4.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-30 17:00-0700\n" +"PO-Revision-Date: 2009-08-30 17:00-0700\n" +"Last-Translator: Denis Auroux 2 || (argc == 2 && argv[1][0] == '-')) { - printf("Invalid command line parameters.\n" - "Usage: %s [filename.xoj]\n", argv[0]); + printf(_("Invalid command line parameters.\n" + "Usage: %s [filename.xoj]\n"), argv[0]); gtk_exit(0); } @@ -283,7 +283,7 @@ void init_stuff (int argc, char *argv[]) set_cursor_busy(FALSE); if (!success) { w = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error opening file '%s'", argv[1]); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error opening file '%s'"), argv[1]); gtk_dialog_run(GTK_DIALOG(w)); gtk_widget_destroy(w); } @@ -295,6 +295,12 @@ main (int argc, char *argv[]) { gchar *path, *path1, *path2; +#ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + gtk_set_locale (); gtk_init (&argc, &argv); diff --git a/src/xo-callbacks.c b/src/xo-callbacks.c index 6c087d3..c382996 100644 --- a/src/xo-callbacks.c +++ b/src/xo-callbacks.c @@ -51,15 +51,15 @@ on_fileNewBackground_activate (GtkMenuItem *menuitem, reset_focus(); if (!ok_to_close()) return; // user aborted on save confirmation - dialog = gtk_file_chooser_dialog_new("Open PDF", GTK_WINDOW (winMain), + dialog = gtk_file_chooser_dialog_new(_("Open PDF"), GTK_WINDOW (winMain), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); filt_all = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_all, "All files"); + gtk_file_filter_set_name(filt_all, _("All files")); gtk_file_filter_add_pattern(filt_all, "*"); filt_pdf = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_pdf, "PDF files"); + gtk_file_filter_set_name(filt_pdf, _("PDF files")); gtk_file_filter_add_pattern(filt_pdf, "*.pdf"); gtk_file_filter_add_pattern(filt_pdf, "*.PDF"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_pdf); @@ -67,7 +67,7 @@ on_fileNewBackground_activate (GtkMenuItem *menuitem, if (ui.default_path!=NULL) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), ui.default_path); - attach_opt = gtk_check_button_new_with_label("Attach file to the journal"); + attach_opt = gtk_check_button_new_with_label(_("Attach file to the journal")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(attach_opt), FALSE); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER (dialog), attach_opt); @@ -102,7 +102,7 @@ on_fileNewBackground_activate (GtkMenuItem *menuitem, /* open failed */ dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error opening file '%s'", filename); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error opening file '%s'"), filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(filename); @@ -122,15 +122,15 @@ on_fileOpen_activate (GtkMenuItem *menuitem, reset_focus(); if (!ok_to_close()) return; // user aborted on save confirmation - dialog = gtk_file_chooser_dialog_new("Open Journal", GTK_WINDOW (winMain), + dialog = gtk_file_chooser_dialog_new(_("Open Journal"), GTK_WINDOW (winMain), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); filt_all = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_all, "All files"); + gtk_file_filter_set_name(filt_all, _("All files")); gtk_file_filter_add_pattern(filt_all, "*"); filt_xoj = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_xoj, "Xournal files"); + gtk_file_filter_set_name(filt_xoj, _("Xournal files")); gtk_file_filter_add_pattern(filt_xoj, "*.xoj"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_xoj); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_all); @@ -151,7 +151,7 @@ on_fileOpen_activate (GtkMenuItem *menuitem, /* open failed */ dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error opening file '%s'", filename); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error opening file '%s'"), filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(filename); @@ -180,7 +180,7 @@ on_fileSave_activate (GtkMenuItem *menuitem, set_cursor_busy(FALSE); /* save failed */ dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error saving file '%s'", ui.filename); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error saving file '%s'"), ui.filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } @@ -200,7 +200,7 @@ on_fileSaveAs_activate (GtkMenuItem *menuitem, end_text(); reset_focus(); - dialog = gtk_file_chooser_dialog_new("Save Journal", GTK_WINDOW (winMain), + dialog = gtk_file_chooser_dialog_new(_("Save Journal"), GTK_WINDOW (winMain), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); @@ -225,10 +225,10 @@ on_fileSaveAs_activate (GtkMenuItem *menuitem, } filt_all = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_all, "All files"); + gtk_file_filter_set_name(filt_all, _("All files")); gtk_file_filter_add_pattern(filt_all, "*"); filt_xoj = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_xoj, "Xournal files"); + gtk_file_filter_set_name(filt_xoj, _("Xournal files")); gtk_file_filter_add_pattern(filt_xoj, "*.xoj"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_xoj); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_all); @@ -254,7 +254,7 @@ on_fileSaveAs_activate (GtkMenuItem *menuitem, if (warn) { warning_dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "Should the file %s be overwritten?", filename); + _("Should the file %s be overwritten?"), filename); if (gtk_dialog_run(GTK_DIALOG(warning_dialog)) == GTK_RESPONSE_YES) warn = FALSE; gtk_widget_destroy(warning_dialog); @@ -273,7 +273,7 @@ on_fileSaveAs_activate (GtkMenuItem *menuitem, set_cursor_busy(FALSE); /* save failed */ dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error saving file '%s'", filename); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error saving file '%s'"), filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(filename); @@ -326,10 +326,10 @@ on_filePrint_activate (GtkMenuItem *menuitem, gpj = gnome_print_job_new(config); /* was NULL */ gnome_print_config_unref(config); /* end */ - printDialog = gnome_print_dialog_new(gpj, (guchar *)"Print", GNOME_PRINT_DIALOG_RANGE); + printDialog = gnome_print_dialog_new(gpj, (guchar *) _("Print"), GNOME_PRINT_DIALOG_RANGE); gnome_print_dialog_construct_range_page(GNOME_PRINT_DIALOG(printDialog), GNOME_PRINT_RANGE_ALL | GNOME_PRINT_RANGE_RANGE, - 1, journal.npages, (guchar *)"Current page", (guchar *)"Pages"); + 1, journal.npages, (guchar *) _("Current page"), (guchar *) _("Pages")); /* don't have "Current page" as option, else it becomes the default!! */ gtk_dialog_set_response_sensitive(GTK_DIALOG(printDialog), @@ -385,7 +385,7 @@ on_filePrintPDF_activate (GtkMenuItem *menuitem, end_text(); reset_focus(); - dialog = gtk_file_chooser_dialog_new("Export to PDF", GTK_WINDOW (winMain), + dialog = gtk_file_chooser_dialog_new(_("Export to PDF"), GTK_WINDOW (winMain), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); @@ -408,10 +408,10 @@ on_filePrintPDF_activate (GtkMenuItem *menuitem, } filt_all = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_all, "All files"); + gtk_file_filter_set_name(filt_all, _("All files")); gtk_file_filter_add_pattern(filt_all, "*"); filt_pdf = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_pdf, "PDF files"); + gtk_file_filter_set_name(filt_pdf, _("PDF files")); gtk_file_filter_add_pattern(filt_pdf, "*.pdf"); gtk_file_filter_add_pattern(filt_pdf, "*.PDF"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_pdf); @@ -429,7 +429,7 @@ on_filePrintPDF_activate (GtkMenuItem *menuitem, if (warn) { warning_dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "Should the file %s be overwritten?", filename); + _("Should the file %s be overwritten?"), filename); if (gtk_dialog_run(GTK_DIALOG(warning_dialog)) == GTK_RESPONSE_YES) warn = FALSE; gtk_widget_destroy(warning_dialog); @@ -442,7 +442,7 @@ on_filePrintPDF_activate (GtkMenuItem *menuitem, if (!print_to_pdf(filename)) { set_cursor_busy(FALSE); dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error creating file '%s'", filename); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error creating file '%s'"), filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } @@ -1474,12 +1474,12 @@ on_journalLoadBackground_activate (GtkMenuItem *menuitem, end_text(); reset_focus(); - dialog = gtk_file_chooser_dialog_new("Open Background", GTK_WINDOW (winMain), + dialog = gtk_file_chooser_dialog_new(_("Open Background"), GTK_WINDOW (winMain), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); filt_all = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_all, "All files"); + gtk_file_filter_set_name(filt_all, _("All files")); gtk_file_filter_add_pattern(filt_all, "*"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_all); @@ -1487,7 +1487,7 @@ on_journalLoadBackground_activate (GtkMenuItem *menuitem, if (!gtk_check_version(2, 6, 0)) { filt_pix = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_pix, "Bitmap files"); + gtk_file_filter_set_name(filt_pix, _("Bitmap files")); gtk_file_filter_add_pixbuf_formats(filt_pix); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_pix); } @@ -1495,14 +1495,14 @@ on_journalLoadBackground_activate (GtkMenuItem *menuitem, #endif filt_pspdf = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_pspdf, "PS/PDF files (as bitmaps)"); + gtk_file_filter_set_name(filt_pspdf, _("PS/PDF files (as bitmaps)")); gtk_file_filter_add_pattern(filt_pspdf, "*.ps"); gtk_file_filter_add_pattern(filt_pspdf, "*.PS"); gtk_file_filter_add_pattern(filt_pspdf, "*.pdf"); gtk_file_filter_add_pattern(filt_pspdf, "*.PDF"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_pspdf); - attach_opt = gtk_check_button_new_with_label("Attach file to the journal"); + attach_opt = gtk_check_button_new_with_label(_("Attach file to the journal")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(attach_opt), FALSE); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER (dialog), attach_opt); @@ -1525,7 +1525,7 @@ on_journalLoadBackground_activate (GtkMenuItem *menuitem, if (bglist == NULL) { dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - "Error opening background '%s'", filename); + _("Error opening background '%s'"), filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(filename); @@ -2077,7 +2077,7 @@ on_toolsTextFont_activate (GtkMenuItem *menuitem, GtkWidget *dialog; gchar *str; - dialog = gtk_font_selection_dialog_new("Select Font"); + dialog = gtk_font_selection_dialog_new(_("Select Font")); str = make_cur_font_name(); gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(dialog), str); g_free(str); @@ -2436,8 +2436,8 @@ on_canvas_button_press_event (GtkWidget *widget, if (ui.cur_layer == NULL) { /* warn */ dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, - GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "Drawing is not allowed on the " - "background layer.\n Switching to Layer 1."); + GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _("Drawing is not allowed on the " + "background layer.\n Switching to Layer 1.")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); on_viewShowLayer_activate(NULL, NULL); @@ -3064,7 +3064,7 @@ on_mru_activate (GtkMenuItem *menuitem, /* open failed */ dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error opening file '%s'", ui.mru[which]); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error opening file '%s'"), ui.mru[which]); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); delete_mru_entry(which); diff --git a/src/xo-file.c b/src/xo-file.c index 2b3f361..7d27860 100644 --- a/src/xo-file.c +++ b/src/xo-file.c @@ -119,7 +119,7 @@ gboolean save_journal(const char *filename) if (!gdk_pixbuf_save(pg->bg->pixbuf, tmpfn, "png", NULL, NULL)) { dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - "Could not write background '%s'. Continuing anyway.", tmpfn); + _("Could not write background '%s'. Continuing anyway."), tmpfn); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } @@ -151,7 +151,7 @@ gboolean save_journal(const char *filename) if (!success) { dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - "Could not write background '%s'. Continuing anyway.", tmpfn); + _("Could not write background '%s'. Continuing anyway."), tmpfn); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } @@ -248,7 +248,7 @@ struct Background *tmpBg_pdf; GError *xoj_invalid(void) { - return g_error_new(G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, "Invalid file contents"); + return g_error_new(G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, _("Invalid file contents")); } void xoj_parser_start_element(GMarkupParseContext *context, @@ -398,7 +398,7 @@ void xoj_parser_start_element(GMarkupParseContext *context, if (tmpPage->bg->pixbuf == NULL) { dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, - "Could not open background '%s'. Setting background to white.", + _("Could not open background '%s'. Setting background to white."), tmpbg_filename); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); @@ -656,20 +656,20 @@ gboolean user_wants_second_chance(char **filename) dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_YES_NO, - "Could not open background '%s'.\nSelect another file?", + _("Could not open background '%s'.\nSelect another file?"), *filename); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); if (response != GTK_RESPONSE_YES) return FALSE; - dialog = gtk_file_chooser_dialog_new("Open PDF", GTK_WINDOW (winMain), + dialog = gtk_file_chooser_dialog_new(_("Open PDF"), GTK_WINDOW (winMain), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); filt_all = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_all, "All files"); + gtk_file_filter_set_name(filt_all, _("All files")); gtk_file_filter_add_pattern(filt_all, "*"); filt_pdf = gtk_file_filter_new(); - gtk_file_filter_set_name(filt_pdf, "PDF files"); + gtk_file_filter_set_name(filt_pdf, _("PDF files")); gtk_file_filter_add_pattern(filt_pdf, "*.pdf"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_pdf); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_all); @@ -769,7 +769,7 @@ gboolean open_journal(char *filename) bgpdf.filename = refstring_ref(tmpBg_pdf->filename); } else { dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Could not open background '%s'.", + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Could not open background '%s'."), tmpfn); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); @@ -956,7 +956,7 @@ gboolean bgpdf_scheduler_callback(gpointer data) // if all requests have been cancelled, remove ourselves from main loop if (bgpdf.requests == NULL) { bgpdf.pid = 0; return FALSE; } if (bgpdf.status == STATUS_NOT_INIT) - { printf("BGPDF not initialized??\n"); bgpdf.pid = 0; return FALSE; } + { printf("DEBUG: BGPDF not initialized??\n"); bgpdf.pid = 0; return FALSE; } req = (struct BgPdfRequest *)bgpdf.requests->data; @@ -964,7 +964,7 @@ gboolean bgpdf_scheduler_callback(gpointer data) pixbuf = NULL; pdfpage = poppler_document_get_page(bgpdf.document, req->pageno-1); if (pdfpage) { -// printf("Processing request for page %d at %f dpi\n", req->pageno, req->dpi); +// printf("DEBUG: Processing request for page %d at %f dpi\n", req->pageno, req->dpi); set_cursor_busy(TRUE); poppler_page_get_size(pdfpage, &width, &height); scaled_width = (int) (req->dpi * width/72); @@ -996,7 +996,7 @@ gboolean bgpdf_scheduler_callback(gpointer data) } else { // failure if (!bgpdf.has_failed) { dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Unable to render one or more PDF pages."); + GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Unable to render one or more PDF pages.")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } @@ -1021,7 +1021,7 @@ void add_bgpdf_request(int pageno, double zoom) req = g_new(struct BgPdfRequest, 1); req->pageno = pageno; req->dpi = 72*zoom; -// printf("Enqueuing request for page %d at %f dpi\n", pageno, req->dpi); +// printf("DEBUG: Enqueuing request for page %d at %f dpi\n", pageno, req->dpi); // cancel any request this may supersede for (list = bgpdf.requests; list != NULL; ) { @@ -1379,217 +1379,217 @@ void save_config_to_file(void) &ui.window_default_width, &ui.window_default_height); update_keyval("general", "display_dpi", - " the display resolution, in pixels per inch", + _(" the display resolution, in pixels per inch"), g_strdup_printf("%.2f", DEFAULT_ZOOM*72)); update_keyval("general", "initial_zoom", - " the initial zoom level, in percent", + _(" the initial zoom level, in percent"), g_strdup_printf("%.2f", 100*ui.zoom/DEFAULT_ZOOM)); update_keyval("general", "window_maximize", - " maximize the window at startup (true/false)", + _(" maximize the window at startup (true/false)"), g_strdup(ui.maximize_at_start?"true":"false")); update_keyval("general", "window_fullscreen", - " start in full screen mode (true/false)", + _(" start in full screen mode (true/false)"), g_strdup(ui.fullscreen?"true":"false")); update_keyval("general", "window_width", - " the window width in pixels (when not maximized)", + _(" the window width in pixels (when not maximized)"), g_strdup_printf("%d", ui.window_default_width)); update_keyval("general", "window_height", - " the window height in pixels", + _(" the window height in pixels"), g_strdup_printf("%d", ui.window_default_height)); update_keyval("general", "scrollbar_speed", - " scrollbar step increment (in pixels)", + _(" scrollbar step increment (in pixels)"), g_strdup_printf("%d", ui.scrollbar_step_increment)); update_keyval("general", "zoom_dialog_increment", - " the step increment in the zoom dialog box", + _(" the step increment in the zoom dialog box"), g_strdup_printf("%d", ui.zoom_step_increment)); update_keyval("general", "zoom_step_factor", - " the multiplicative factor for zoom in/out", + _(" the multiplicative factor for zoom in/out"), g_strdup_printf("%.3f", ui.zoom_step_factor)); update_keyval("general", "view_continuous", - " document view (true = continuous, false = single page)", + _(" document view (true = continuous, false = single page)"), g_strdup(ui.view_continuous?"true":"false")); update_keyval("general", "use_xinput", - " use XInput extensions (true/false)", + _(" use XInput extensions (true/false)"), g_strdup(ui.allow_xinput?"true":"false")); update_keyval("general", "discard_corepointer", - " discard Core Pointer events in XInput mode (true/false)", + _(" discard Core Pointer events in XInput mode (true/false)"), g_strdup(ui.discard_corepointer?"true":"false")); update_keyval("general", "use_erasertip", - " always map eraser tip to eraser (true/false)", + _(" always map eraser tip to eraser (true/false)"), g_strdup(ui.use_erasertip?"true":"false")); update_keyval("general", "default_path", - " default path for open/save (leave blank for current directory)", + _(" default path for open/save (leave blank for current directory)"), g_strdup((ui.default_path!=NULL)?ui.default_path:"")); update_keyval("general", "pressure_sensitivity", - " use pressure sensitivity to control pen stroke width (true/false)", + _(" use pressure sensitivity to control pen stroke width (true/false)"), g_strdup(ui.pressure_sensitivity?"true":"false")); update_keyval("general", "width_minimum_multiplier", - " minimum width multiplier", + _(" minimum width multiplier"), g_strdup_printf("%.2f", ui.width_minimum_multiplier)); update_keyval("general", "width_maximum_multiplier", - " maximum width multiplier", + _(" maximum width multiplier"), g_strdup_printf("%.2f", ui.width_maximum_multiplier)); update_keyval("general", "interface_order", - " interface components from top to bottom\n valid values: drawarea menu main_toolbar pen_toolbar statusbar", + _(" interface components from top to bottom\n valid values: drawarea menu main_toolbar pen_toolbar statusbar"), verbose_vertical_order(ui.vertical_order[0])); update_keyval("general", "interface_fullscreen", - " interface components in fullscreen mode, from top to bottom", + _(" interface components in fullscreen mode, from top to bottom"), verbose_vertical_order(ui.vertical_order[1])); update_keyval("general", "interface_lefthanded", - " interface has left-handed scrollbar (true/false)", + _(" interface has left-handed scrollbar (true/false)"), g_strdup(ui.left_handed?"true":"false")); update_keyval("general", "shorten_menus", - " hide some unwanted menu or toolbar items (true/false)", + _(" hide some unwanted menu or toolbar items (true/false)"), g_strdup(ui.shorten_menus?"true":"false")); update_keyval("general", "shorten_menu_items", - " interface items to hide (customize at your own risk!)\n see source file xo-interface.c for a list of item names", + _(" interface items to hide (customize at your own risk!)\n see source file xo-interface.c for a list of item names"), g_strdup(ui.shorten_menu_items)); update_keyval("general", "highlighter_opacity", - " highlighter opacity (0 to 1, default 0.5)\n warning: opacity level is not saved in xoj files!", + _(" highlighter opacity (0 to 1, default 0.5)\n warning: opacity level is not saved in xoj files!"), g_strdup_printf("%.2f", ui.hiliter_opacity)); update_keyval("general", "autosave_prefs", - " auto-save preferences on exit (true/false)", + _(" auto-save preferences on exit (true/false)"), g_strdup(ui.auto_save_prefs?"true":"false")); update_keyval("paper", "width", - " the default page width, in points (1/72 in)", + _(" the default page width, in points (1/72 in)"), g_strdup_printf("%.2f", ui.default_page.width)); update_keyval("paper", "height", - " the default page height, in points (1/72 in)", + _(" the default page height, in points (1/72 in)"), g_strdup_printf("%.2f", ui.default_page.height)); update_keyval("paper", "color", - " the default paper color", + _(" the default paper color"), g_strdup(bgcolor_names[ui.default_page.bg->color_no])); update_keyval("paper", "style", - " the default paper style (plain, lined, ruled, or graph)", + _(" the default paper style (plain, lined, ruled, or graph)"), g_strdup(bgstyle_names[ui.default_page.bg->ruling])); update_keyval("paper", "apply_all", - " apply paper style changes to all pages (true/false)", + _(" apply paper style changes to all pages (true/false)"), g_strdup(ui.bg_apply_all_pages?"true":"false")); update_keyval("paper", "default_unit", - " preferred unit (cm, in, px, pt)", + _(" preferred unit (cm, in, px, pt)"), g_strdup(unit_names[ui.default_unit])); update_keyval("paper", "print_ruling", - " include paper ruling when printing or exporting to PDF (true/false)", + _(" include paper ruling when printing or exporting to PDF (true/false)"), g_strdup(ui.print_ruling?"true":"false")); update_keyval("paper", "antialias_bg", - " antialiased bitmap backgrounds (true/false)", + _(" antialiased bitmap backgrounds (true/false)"), g_strdup(ui.antialias_bg?"true":"false")); update_keyval("paper", "progressive_bg", - " just-in-time update of page backgrounds (true/false)", + _(" just-in-time update of page backgrounds (true/false)"), g_strdup(ui.progressive_bg?"true":"false")); update_keyval("paper", "gs_bitmap_dpi", - " bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)", + _(" bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)"), g_strdup_printf("%d", GS_BITMAP_DPI)); update_keyval("paper", "pdftoppm_printing_dpi", - " bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)", + _(" bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)"), g_strdup_printf("%d", PDFTOPPM_PRINTING_DPI)); update_keyval("tools", "startup_tool", - " selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, hand)", + _(" selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, hand)"), g_strdup(tool_names[ui.startuptool])); update_keyval("tools", "pen_color", - " default pen color", + _(" default pen color"), g_strdup(color_names[ui.default_brushes[TOOL_PEN].color_no])); update_keyval("tools", "pen_thickness", - " default pen thickness (fine = 1, medium = 2, thick = 3)", + _(" default pen thickness (fine = 1, medium = 2, thick = 3)"), g_strdup_printf("%d", ui.default_brushes[TOOL_PEN].thickness_no)); update_keyval("tools", "pen_ruler", - " default pen is in ruler mode (true/false)", + _(" default pen is in ruler mode (true/false)"), g_strdup(ui.default_brushes[TOOL_PEN].ruler?"true":"false")); update_keyval("tools", "pen_recognizer", - " default pen is in shape recognizer mode (true/false)", + _(" default pen is in shape recognizer mode (true/false)"), g_strdup(ui.default_brushes[TOOL_PEN].recognizer?"true":"false")); update_keyval("tools", "eraser_thickness", - " default eraser thickness (fine = 1, medium = 2, thick = 3)", + _(" default eraser thickness (fine = 1, medium = 2, thick = 3)"), g_strdup_printf("%d", ui.default_brushes[TOOL_ERASER].thickness_no)); update_keyval("tools", "eraser_mode", - " default eraser mode (standard = 0, whiteout = 1, strokes = 2)", + _(" default eraser mode (standard = 0, whiteout = 1, strokes = 2)"), g_strdup_printf("%d", ui.default_brushes[TOOL_ERASER].tool_options)); update_keyval("tools", "highlighter_color", - " default highlighter color", + _(" default highlighter color"), g_strdup(color_names[ui.default_brushes[TOOL_HIGHLIGHTER].color_no])); update_keyval("tools", "highlighter_thickness", - " default highlighter thickness (fine = 1, medium = 2, thick = 3)", + _(" default highlighter thickness (fine = 1, medium = 2, thick = 3)"), g_strdup_printf("%d", ui.default_brushes[TOOL_HIGHLIGHTER].thickness_no)); update_keyval("tools", "highlighter_ruler", - " default highlighter is in ruler mode (true/false)", + _(" default highlighter is in ruler mode (true/false)"), g_strdup(ui.default_brushes[TOOL_HIGHLIGHTER].ruler?"true":"false")); update_keyval("tools", "highlighter_recognizer", - " default highlighter is in shape recognizer mode (true/false)", + _(" default highlighter is in shape recognizer mode (true/false)"), g_strdup(ui.default_brushes[TOOL_HIGHLIGHTER].recognizer?"true":"false")); update_keyval("tools", "btn2_tool", - " button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)", + _(" button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)"), g_strdup(tool_names[ui.toolno[1]])); update_keyval("tools", "btn2_linked", - " button 2 brush linked to primary brush (true/false) (overrides all other settings)", + _(" button 2 brush linked to primary brush (true/false) (overrides all other settings)"), g_strdup((ui.linked_brush[1]==BRUSH_LINKED)?"true":"false")); update_keyval("tools", "btn2_color", - " button 2 brush color (for pen or highlighter only)", + _(" button 2 brush color (for pen or highlighter only)"), g_strdup((ui.toolno[1]action_area; gtk_widget_show (dialog_action_area1); @@ -2923,7 +2923,7 @@ create_aboutDialog (void) GtkWidget *closebutton1; aboutDialog = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (aboutDialog), "About Xournal"); + gtk_window_set_title (GTK_WINDOW (aboutDialog), _("About Xournal")); gtk_window_set_resizable (GTK_WINDOW (aboutDialog), FALSE); gtk_window_set_type_hint (GTK_WINDOW (aboutDialog), GDK_WINDOW_TYPE_HINT_DIALOG); @@ -2934,12 +2934,12 @@ create_aboutDialog (void) gtk_widget_show (image387); gtk_box_pack_start (GTK_BOX (dialog_vbox2), image387, FALSE, TRUE, 12); - labelTitle = gtk_label_new ("Xournal"); + labelTitle = gtk_label_new (_("Xournal")); gtk_widget_show (labelTitle); gtk_box_pack_start (GTK_BOX (dialog_vbox2), labelTitle, FALSE, FALSE, 3); gtk_label_set_justify (GTK_LABEL (labelTitle), GTK_JUSTIFY_CENTER); - labelInfo = gtk_label_new ("Written by Denis Auroux\n http://xournal.sourceforge.net/ "); + labelInfo = gtk_label_new (_("Written by Denis Auroux\n http://xournal.sourceforge.net/ ")); gtk_widget_show (labelInfo); gtk_box_pack_start (GTK_BOX (dialog_vbox2), labelInfo, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (labelInfo), GTK_JUSTIFY_CENTER); @@ -2987,7 +2987,7 @@ create_zoomDialog (void) GtkWidget *button2; zoomDialog = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (zoomDialog), "Set Zoom"); + gtk_window_set_title (GTK_WINDOW (zoomDialog), _("Set Zoom")); gtk_window_set_modal (GTK_WINDOW (zoomDialog), TRUE); gtk_window_set_type_hint (GTK_WINDOW (zoomDialog), GDK_WINDOW_TYPE_HINT_DIALOG); @@ -3003,7 +3003,7 @@ create_zoomDialog (void) gtk_widget_show (hbox4); gtk_box_pack_start (GTK_BOX (vbox1), hbox4, FALSE, FALSE, 0); - radioZoom = gtk_radio_button_new_with_mnemonic (NULL, "Zoom: "); + radioZoom = gtk_radio_button_new_with_mnemonic (NULL, _("Zoom: ")); gtk_widget_show (radioZoom); gtk_box_pack_start (GTK_BOX (hbox4), radioZoom, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (radioZoom), 4); @@ -3016,26 +3016,26 @@ create_zoomDialog (void) gtk_box_pack_start (GTK_BOX (hbox4), spinZoom, FALSE, TRUE, 5); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinZoom), TRUE); - label1 = gtk_label_new ("%"); + label1 = gtk_label_new (_("%")); gtk_widget_show (label1); gtk_box_pack_start (GTK_BOX (hbox4), label1, FALSE, TRUE, 0); gtk_misc_set_alignment (GTK_MISC (label1), 0.48, 0.5); - radioZoom100 = gtk_radio_button_new_with_mnemonic (NULL, "Normal size (100%)"); + radioZoom100 = gtk_radio_button_new_with_mnemonic (NULL, _("Normal size (100%)")); gtk_widget_show (radioZoom100); gtk_box_pack_start (GTK_BOX (vbox1), radioZoom100, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (radioZoom100), 4); gtk_radio_button_set_group (GTK_RADIO_BUTTON (radioZoom100), radioZoom_group); radioZoom_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radioZoom100)); - radioZoomWidth = gtk_radio_button_new_with_mnemonic (NULL, "Page Width"); + radioZoomWidth = gtk_radio_button_new_with_mnemonic (NULL, _("Page Width")); gtk_widget_show (radioZoomWidth); gtk_box_pack_start (GTK_BOX (vbox1), radioZoomWidth, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (radioZoomWidth), 4); gtk_radio_button_set_group (GTK_RADIO_BUTTON (radioZoomWidth), radioZoom_group); radioZoom_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radioZoomWidth)); - radioZoomHeight = gtk_radio_button_new_with_mnemonic (NULL, "Page Height"); + radioZoomHeight = gtk_radio_button_new_with_mnemonic (NULL, _("Page Height")); gtk_widget_show (radioZoomHeight); gtk_box_pack_start (GTK_BOX (vbox1), radioZoomHeight, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (radioZoomHeight), 4); diff --git a/src/xo-misc.c b/src/xo-misc.c index a5329c3..0d4abc2 100644 --- a/src/xo-misc.c +++ b/src/xo-misc.c @@ -1241,12 +1241,12 @@ void update_page_stuff(void) gtk_spin_button_set_range(spin, 1, journal.npages+1); /* npages+1 will be used to create a new page at end */ gtk_spin_button_set_value(spin, ui.pageno+1); - g_snprintf(tmp, 10, " of %d", journal.npages); + g_snprintf(tmp, 10, _(" of %d"), journal.npages); gtk_label_set_text(GTK_LABEL(GET_COMPONENT("labelNumpages")), tmp); layerbox = GTK_COMBO_BOX(GET_COMPONENT("comboLayer")); if (ui.layerbox_length == 0) { - gtk_combo_box_prepend_text(layerbox, "Background"); + gtk_combo_box_prepend_text(layerbox, _("Background")); ui.layerbox_length++; } while (ui.layerbox_length > ui.cur_page->nlayers+1) { @@ -1254,7 +1254,7 @@ void update_page_stuff(void) ui.layerbox_length--; } while (ui.layerbox_length < ui.cur_page->nlayers+1) { - g_snprintf(tmp, 10, "Layer %d", ui.layerbox_length++); + g_snprintf(tmp, 10, _("Layer %d"), ui.layerbox_length++); gtk_combo_box_prepend_text(layerbox, tmp); } gtk_combo_box_set_active(layerbox, ui.cur_page->nlayers-1-ui.layerno); @@ -1370,13 +1370,13 @@ void update_file_name(char *filename) if (ui.filename != NULL) g_free(ui.filename); ui.filename = filename; if (filename == NULL) { - gtk_window_set_title(GTK_WINDOW (winMain), "Xournal"); + gtk_window_set_title(GTK_WINDOW (winMain), _("Xournal")); return; } p = g_utf8_strrchr(filename, -1, '/'); if (p == NULL) p = filename; else p = g_utf8_next_char(p); - g_snprintf(tmp, 100, "Xournal - %s", p); + g_snprintf(tmp, 100, _("Xournal - %s"), p); gtk_window_set_title(GTK_WINDOW (winMain), tmp); new_mru_entry(filename); } @@ -1609,8 +1609,8 @@ gboolean ok_to_close(void) if (ui.saved) return TRUE; dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, "Save changes to '%s'?", - (ui.filename!=NULL) ? ui.filename:"Untitled"); + GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("Save changes to '%s'?"), + (ui.filename!=NULL) ? ui.filename:_("Untitled")); gtk_dialog_add_button(GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); response = gtk_dialog_run(GTK_DIALOG (dialog)); gtk_widget_destroy(dialog); diff --git a/src/xo-print.c b/src/xo-print.c index cb480b1..dc14d4e 100644 --- a/src/xo-print.c +++ b/src/xo-print.c @@ -19,6 +19,7 @@ #include "sft.h" /* Sun Font Tools, embedded in libgnomeprint */ #include "xournal.h" +#include "xo-support.h" #include "xo-misc.h" #include "xo-paint.h" #include "xo-print.h" @@ -1490,7 +1491,7 @@ void print_page(GnomePrintContext *gpc, struct Page *pg, int pageno, if (pg==NULL) return; - g_snprintf(tmp, 10, "Page %d", pageno); + g_snprintf(tmp, 10, _("Page %d"), pageno); gnome_print_beginpage(gpc, (guchar *)tmp); gnome_print_gsave(gpc); @@ -1581,7 +1582,7 @@ void print_job_render(GnomePrintJob *gpj, int fromPage, int toPage) abort = FALSE; wait_dialog = gtk_message_dialog_new(GTK_WINDOW(winMain), GTK_DIALOG_MODAL, - GTK_MESSAGE_INFO, GTK_BUTTONS_CANCEL, "Preparing print job"); + GTK_MESSAGE_INFO, GTK_BUTTONS_CANCEL, _("Preparing print job")); gtk_widget_show(wait_dialog); g_signal_connect(wait_dialog, "response", G_CALLBACK (cb_print_abort), &abort); @@ -1589,7 +1590,7 @@ void print_job_render(GnomePrintJob *gpj, int fromPage, int toPage) #if GTK_CHECK_VERSION(2,6,0) if (!gtk_check_version(2, 6, 0)) gtk_message_dialog_format_secondary_text( - GTK_MESSAGE_DIALOG(wait_dialog), "Page %d", i+1); + GTK_MESSAGE_DIALOG(wait_dialog), _("Page %d"), i+1); #endif while (gtk_events_pending()) gtk_main_iteration(); print_page(gpc, (struct Page *)g_list_nth_data(journal.pages, i), i+1, @@ -1599,7 +1600,7 @@ void print_job_render(GnomePrintJob *gpj, int fromPage, int toPage) #if GTK_CHECK_VERSION(2,6,0) if (!gtk_check_version(2, 6, 0)) gtk_message_dialog_format_secondary_text( - GTK_MESSAGE_DIALOG(wait_dialog), "Finalizing..."); + GTK_MESSAGE_DIALOG(wait_dialog), _("Finalizing...")); #endif while (gtk_events_pending()) gtk_main_iteration(); diff --git a/src/xo-shapes.c b/src/xo-shapes.c index 0efdf69..01f9073 100644 --- a/src/xo-shapes.c +++ b/src/xo-shapes.c @@ -408,7 +408,7 @@ gboolean try_arrow(void) while (alpha[i]<-M_PI/2) { alpha[i]+=M_PI; rs[i].reversed = !rs[i].reversed; } while (alpha[i]>M_PI/2) { alpha[i]-=M_PI; rs[i].reversed = !rs[i].reversed; } #ifdef RECOGNIZER_DEBUG - printf("arrow: alpha[%d] = %.1f degrees\n", i, alpha[i]*180/M_PI); + printf("DEBUG: arrow: alpha[%d] = %.1f degrees\n", i, alpha[i]*180/M_PI); #endif if (fabs(alpha[i])ARROW_ANGLE_MAX) return FALSE; } @@ -424,20 +424,20 @@ gboolean try_arrow(void) dist = hypot(pt[0]-(rs[j].reversed?rs[j].x1:rs[j].x2), pt[1]-(rs[j].reversed?rs[j].y1:rs[j].y2)); #ifdef RECOGNIZER_DEBUG - printf("linear tolerance: tip[%d] = %.2f\n", j, dist/rs[j].radius); + printf("DEBUG: linear tolerance: tip[%d] = %.2f\n", j, dist/rs[j].radius); #endif if (dist>ARROW_TIP_LINEAR_TOLERANCE*rs[j].radius) return FALSE; } dist = (pt[0]-x2)*sin(angle)-(pt[1]-y2)*cos(angle); dist /= rs[1].radius + rs[2].radius; #ifdef RECOGNIZER_DEBUG - printf("sideways gap tolerance = %.2f\n", dist); + printf("DEBUG: sideways gap tolerance = %.2f\n", dist); #endif if (fabs(dist)>ARROW_SIDEWAYS_GAP_TOLERANCE) return FALSE; dist = (pt[0]-x2)*cos(angle)+(pt[1]-y2)*sin(angle); dist /= rs[1].radius + rs[2].radius; #ifdef RECOGNIZER_DEBUG - printf("main linear gap = %.2f\n", dist); + printf("DEBUG: main linear gap = %.2f\n", dist); #endif if (distARROW_MAIN_LINEAR_GAP_MAX) return FALSE; @@ -534,7 +534,7 @@ void recognize_patterns(void) it = undo->item; calc_inertia(it->path->coords, 0, it->path->num_points-1, &s); #ifdef RECOGNIZER_DEBUG - printf("Mass=%.0f, Center=(%.1f,%.1f), I=(%.0f,%.0f, %.0f), " + printf("DEBUG: Mass=%.0f, Center=(%.1f,%.1f), I=(%.0f,%.0f, %.0f), " "Rad=%.2f, Det=%.4f \n", s.mass, center_x(s), center_y(s), I_xx(s), I_yy(s), I_xy(s), I_rad(s), I_det(s)); #endif @@ -544,9 +544,9 @@ void recognize_patterns(void) if (n>0) { optimize_polygonal(it->path->coords, n, brk, ss); #ifdef RECOGNIZER_DEBUG - printf("Polygon, %d edges: ", n); + printf("DEBUG: Polygon, %d edges: ", n); for (i=0; iCIRCLE_MIN_DET) { score = score_circle(it->path->coords, 0, it->path->num_points-1, &s); #ifdef RECOGNIZER_DEBUG - printf("Circle score: %.2f\n", score); + printf("DEBUG: Circle score: %.2f\n", score); #endif if (score < CIRCLE_MAX_SCORE) { make_circle_shape(center_x(s), center_y(s), I_rad(s)); diff --git a/src/xo-support.c b/src/xo-support.c index aaa8f1f..5d2689f 100644 --- a/src/xo-support.c +++ b/src/xo-support.c @@ -87,7 +87,7 @@ create_pixmap (GtkWidget *widget, if (!pathname) { - g_warning ("Couldn't find pixmap file: %s", filename); + g_warning (_("Couldn't find pixmap file: %s"), filename); return gtk_image_new (); } @@ -111,14 +111,14 @@ create_pixbuf (const gchar *filename) if (!pathname) { - g_warning ("Couldn't find pixmap file: %s", filename); + g_warning (_("Couldn't find pixmap file: %s"), filename); return NULL; } pixbuf = gdk_pixbuf_new_from_file (pathname, &error); if (!pixbuf) { - fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", + fprintf (stderr, _("Failed to load pixbuf file: %s: %s\n"), pathname, error->message); g_error_free (error); } diff --git a/src/xo-support.h b/src/xo-support.h index 2dea079..a32649e 100644 --- a/src/xo-support.h +++ b/src/xo-support.h @@ -8,6 +8,31 @@ #include +/* + * Standard gettext macros. + */ +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# define Q_(String) g_strip_context ((String), gettext (String)) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define Q_(String) g_strip_context ((String), (String)) +# define N_(String) (String) +#endif + + /* * Public Functions. */ diff --git a/src/xournal.h b/src/xournal.h index f6cc967..8e2aff6 100644 --- a/src/xournal.h +++ b/src/xournal.h @@ -134,7 +134,7 @@ struct UndoErasureData; typedef struct Item { int type; struct Brush brush; // the brush to use, if ITEM_STROKE - // 'brush" also contains color info for text items + // 'brush' also contains color info for text items GnomeCanvasPoints *path; gdouble *widths; GnomeCanvasItem *canvas_item; // the corresponding canvas item, or NULL diff --git a/x-xoj.desktop b/x-xoj.desktop index 56097f1..2288565 100644 --- a/x-xoj.desktop +++ b/x-xoj.desktop @@ -7,3 +7,4 @@ Patterns=*.xoj;*.XOJ;*.Xoj; Comment=Xournal note file Comment[fr]=Fichier Xournal +Comment[ca]=Fitxers de nota del Xournal diff --git a/xournal.desktop b/xournal.desktop index 4ff6c08..b593707 100644 --- a/xournal.desktop +++ b/xournal.desktop @@ -6,6 +6,8 @@ Name=Xournal Comment=Take handwritten notes Name[fr]=Xournal Comment[fr]=Prise de notes manuscrites +Name[ca]=Xournal +Comment[ca]=Preneu notes a mà Exec=xournal %f Terminal=false diff --git a/xournal.gladep b/xournal.gladep index c5d37e7..ad54b36 100644 --- a/xournal.gladep +++ b/xournal.gladep @@ -5,7 +5,6 @@ Xournal xournal FALSE - FALSE TRUE xo-interface.c xo-interface.h -- 2.39.2