msginit -l aa_CC -o aa.po -i midori.pot
sed -i 's/PACKAGE/midori/g' aa.po
-Make sure you add your language to the file po/LINGUAS.
-Just open the file with a text editor and add your code.
-
To check your language 'aa' for errors, do this:
msgfmt -c --check-accelerators=_ aa.po
import os
import UnitTest
import Task
-from TaskGen import extension
+from TaskGen import extension, feature, taskgen
import misc
major = 0
if 'CC' in os.environ: conf.env['CC'] = os.environ['CC'].split()
conf.env['addons'] = option_enabled ('addons')
conf.env['docs'] = option_enabled ('docs')
+ if 'LINGUAS' in os.environ: conf.env['LINGUAS'] = os.environ['LINGUAS']
conf.check (header_name='unistd.h')
if not conf.env['HAVE_UNIQUE']:
opt.add_option ('--build', help='Ignored')
opt.add_option ('--disable-maintainer-mode', help='Ignored')
+# Taken from Geany's wscript, modified to support LINGUAS variable
+def write_linguas_file (self):
+ linguas = ''
+ if 'LINGUAS' in Build.bld.env:
+ linguas = Build.bld.env['LINGUAS']
+ else:
+ files = os.listdir ('../po')
+ for f in files:
+ if f.endswith ('.po'):
+ linguas += '%s ' % f[:-3]
+ f = open ('../po/LINGUAS', 'w')
+ f.write ('# This file is autogenerated. Do not edit.\n%s\n' % linguas)
+ f.close ()
+write_linguas_file = feature ('intltool_po')(write_linguas_file)
+
def build (bld):
def image_to_win32ico (task):
'Converts an image to a Win32 ico'
distclean ()
def distclean ():
+ if os.path.exists ('po/LINGUAS'):
+ os.remove ('po/LINGUAS')
if os.path.exists ('po/midori.pot'):
os.remove ('po/midori.pot')