[gnome-music] Fix traslations



commit a09f8e3a9cc4094bd55e292b0c5597eb91001e9f
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Apr 2 19:12:12 2013 +0200

    Fix traslations
    
    We need to configure in the po/ directory and add a POTFILES.in file.
    Also, we need to initialize Gettext to be able to use _()

 Makefile.am                      |    2 +-
 configure.ac                     |    7 +++++++
 data/gnome-music.desktop.in      |    9 +++++++++
 data/org.gnome.Music.gschema.xml |   12 ++++++------
 po/POTFILES.in                   |   13 +++++++++++++
 src/main.js                      |    3 ++-
 6 files changed, 38 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1f51274..86d3bb0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I m4 -I libgd
 
-SUBDIRS = libgd src data
+SUBDIRS = po libgd src data
 
 MAINTAINERCLEANFILES = \
        $(srcdir)/INSTALL \
diff --git a/configure.ac b/configure.ac
index a6c561e..6d1c0b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,12 @@ AM_INIT_AUTOMAKE([1.11 dist-xz foreign tar-ustar -Wno-portability])
 
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
+GETTEXT_PACKAGE=gnome-music
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
+                   [The prefix for our gettext translation domains.])
+IT_PROG_INTLTOOL(0.26)
+
 AC_PROG_CC
 AM_PROG_CC_C_O
 LT_INIT([disable-static])
@@ -32,5 +38,6 @@ AC_CONFIG_FILES([
   data/Makefile
   libgd/Makefile
   src/Makefile
+  po/Makefile.in
 ])
 AC_OUTPUT
diff --git a/data/gnome-music.desktop.in b/data/gnome-music.desktop.in
new file mode 100644
index 0000000..3843c39
--- /dev/null
+++ b/data/gnome-music.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+_Name=Music
+_GenericName=Music Player
+_Comment=Play and organize your music collection
+Icon=audio-x-generic
+Exec=gnome-music
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;AudioVideo;Player;Audio;
diff --git a/data/org.gnome.Music.gschema.xml b/data/org.gnome.Music.gschema.xml
index 3146f55..19bfab0 100644
--- a/data/org.gnome.Music.gschema.xml
+++ b/data/org.gnome.Music.gschema.xml
@@ -1,30 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <schemalist>
     <schema path="/org/gnome/Music/" id="org.gnome.Music" gettext-domain="gnome-music">
-        <key name="window-size" type="ai">
+        <key type="ai" name="window-size">
             <default>[768, 600]</default>
             <summary>Window size</summary>
             <description>Window size (width and height).</description>
         </key>
-        <key name="window-position" type="ai">
+        <key type="ai" name="window-position">
             <default>[]</default>
             <summary>Window position</summary>
             <description>Window position (x and y).</description>
         </key>
-        <key name="window-maximized" type="b">
+        <key type="b" name="window-maximized">
             <default>true</default>
             <summary>Window maximized</summary>
             <description>Window maximized state</description>
         </key>
-        <key name="shuffle" type="b">
+        <key type="b" name="shuffle">
             <default>false</default>
             <summary>Shuffle playback</summary>
             <description>If true, do randomized playback through the collection</description>
         </key>
-        <key name="search" type="b">
+        <key type="b" name="search">
             <default>false</default>
             <summary>Search mode</summary>
             <description>If true, the search bar is shown</description>
         </key>
     </schema>
-</schemalist>
+</schemalist>
\ No newline at end of file
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..634e16e
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,13 @@
+data/gnome-music.desktop.in
+src/albumArtCache.js
+src/application.js
+src/grilo.js
+src/main.js
+src/package.js
+src/player.js
+src/query.js
+src/searchbar.js
+src/toolbar.js
+src/view.js
+src/widgets.js
+src/window.js
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 759a0c8..908eee2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -17,7 +17,8 @@
  *
  */
 
-pkg.initSubmodule('libgd')
+pkg.initSubmodule('libgd');
+pkg.initGettext();
 
 const GIRepository = imports.gi.GIRepository;
 const App = imports.application;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]