Commit 9380f9b
install translations
Changed files (3)
Diff
@@ -1,6 +1,7 @@ #!/usr/bin/python import os import subprocess+import glob from optparse import OptionParser def install (file, dir):@@ -57,6 +58,11 @@ install ('build/libbirdfont.so', '/lib') install ('build/birdfont.1.gz', '/share/man/man1') install ('build/birdfont-export.1.gz', '/share/man/man1') +# translations+for lang_dir in glob.glob('build/locale/*'):+ lc = lang_dir.replace ('build/locale/', "")+ install ('build/locale/' + lc + '/LC_MESSAGES/birdfont.mo', '/share/locale/' + lc + '/LC_MESSAGES' );+ installed.close () subprocess.check_output ('ldconfig', shell=True)@@ -142,7 +142,8 @@ public abstract class FontDisplay : GLib.Object { } public static File find_layout_dir () {- return find_file (null, "layout");+ File f = find_file (null, "layout");+ return f; } public void add_html_callback (string prop, PropertyFunction.PropertyCallback cb) {@@ -191,7 +192,7 @@ public abstract class FontDisplay : GLib.Object { public static File find_file (string? dir, string name) { File f; string d = (dir == null) ? "" : (!) dir;- + f = get_file (Supplement.exec_path + "/", name + "/"); if (likely (f.query_exists ())) return f; @@ -123,7 +123,7 @@ public class Supplement { if (f.query_exists ()) { Intl.bindtextdomain (GETTEXT_PACKAGE, PREFIX + "/share/locale"); return; - } + } f = File.new_for_path ("/usr/local/share/locale/sv/LC_MESSAGES/birdfont.mo"); if (f.query_exists ()) {