GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — e2openplugin-FileCommander/setup_translate.py at master · E2OpenPlugins/e2openplugin-FileCommander

Expand file tree

/

setup_translate.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
42 lines (32 loc) · 1.04 KB
/

setup_translate.py

Copy path

File metadata and controls

42 lines (32 loc) · 1.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from __future__ import print_function
# Language extension for distutils Python scripts. Based on this concept:
# http://wiki.maemo.org/Internationalize_a_Python_application
from distutils import cmd
from distutils.command.build import build as _build
import os
class build_trans(cmd.Command):
description = 'Compile .po files into .mo files'
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
s = os.path.join('plugin', 'locale')
for lang in os.listdir(s):
lc = os.path.join(s, lang, 'LC_MESSAGES')
if os.path.isdir(lc):
for f in os.listdir(lc):
if f.endswith('.po'):
src = os.path.join(lc, f)
dest = os.path.join(lc, f[:-2] + 'mo')
print("Language compile %s -> %s" % (src, dest))
if os.system("msgfmt '%s' -o '%s'" % (src, dest)) != 0:
raise Exception("Failed to compile: " + src)
class build(_build):
sub_commands = _build.sub_commands + [('build_trans', None)]
def run(self):
_build.run(self)
cmdclass = {
'build': build,
'build_trans': build_trans,
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.