7117291 Deliver translatable content in a separate IPS package
7072060 ai components should use /usr/share/locale for gettext, and refine message domain names
7116665 it's not clear which gettext is used for build
--- a/usr/src/Makefile.master Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/Makefile.master Sat Apr 07 07:57:13 2012 +0900
@@ -97,10 +97,11 @@
XGETTEXT= xgettext
XGETFLAGS= -c TRANSLATION_NOTE
GNUXGETTEXT= /usr/gnu/bin/xgettext
-GNUXGETFLAGS= --keyword=_ --strict --no-location --omit-header
+GNUXGETFLAGS= --keyword=_ --keyword=N_
CSTYLE= cstyle -pP
NAWK= /usr/bin/nawk
GREP= /usr/bin/grep
+GGREP= /usr/gnu/bin/grep
# Reference paths for ON
ONLIBDIR= $(ONREF_PROTO)/lib
@@ -179,11 +180,11 @@
ROOTUSRSHARETIHELPC= $(ROOTUSRSHARETIHELP)/C
ROOTUSRLIB= $(ROOT)/usr/lib
ROOTUSRLIBBOOT= $(ROOTUSRLIB)/boot
-ROOTUSRLIBMSGS= $(ROOTUSRLIB)/locale/C/LC_MESSAGES
+ROOTUSRSHAREMSGS= $(ROOTUSRSHARE)/locale/C/LC_MESSAGES
ROOTUSRSBIN= $(ROOT)/usr/sbin
ROOTVAR= $(ROOT)/var
-INSTMSGS= $(MSG_DOMAIN:%=$(ROOTUSRLIBMSGS)/%.po)
+INSTMSGS= $(MSG_DOMAIN:%=$(ROOTUSRSHAREMSGS)/%.po)
ROOTSBINPROG= $(PROG:%=$(ROOTSBIN)/%)
ROOTUSRINCLEXP= $(EXPHDRS:%=$(ROOTINCADMIN)/%)
ROOTUSRSBINPROG= $(PROG:%=$(ROOTUSRSBIN)/%)
@@ -251,14 +252,35 @@
ARCH= $(TARGET_ARCH:-%=%)
# Message catalog build rule for packaging commands.
-BUILD.po= $(XGETTEXT) -d msg.$$$$ $(XGETFLAGS) $<.i ;\
- $(CAT) msg.$$$$.po | sed "/^domain/d" > $@ ;\
- $(RM) msg.$$$$.po $<.i
-
-POFILE= $(PROG).po
+POFILE= $(MSG_DOMAIN).po
MSGROOT= $(ROOT)/catalog
MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
-CLOBBERFILES += $(POFILE) $(POFILES)
+CLOBBERFILES += $(POFILE)
+
+# Generate a po file from msgfiles
+# The procedure for building po file from Python, Glade and Shell files
+# differs, so we have to handle each file type separately.
+# First, a list of files of each type is established, then xgettext is run
+# for each non-empty list.
+
+$(MSG_DOMAIN).po: $(MSGFILES)
+ PYMSGFILES=`$(ECHO) $(MSGFILES)|$(GGREP) -o '[^\ ]*\.py'` || true; \
+ GLADEMSGFILES=`$(ECHO) $(MSGFILES)|$(GGREP) -o '[^\ ]*\.xml'` || true; \
+ KSHMSGFILES=`$(ECHO) $(MSGFILES)|$(GGREP) -o '[^\ ]*\.ksh'` || true; \
+ echo "PYMSGFILES=$$PYMSGFILES GLADEMSGFILES=$$GLADEMSGFILES KSHMSGFILES=$$KSHMSGFILES"; \
+ echo ""|$(GNUXGETTEXT) -o $@ --force-po -L C -; gsed -i s/charset=CHARSET/charset=UTF-8/ $@; \
+ if [ ! -z "$$PYMSGFILES" ]; then \
+ $(GNUXGETTEXT) -o $@ $(GNUXGETFLAGS) -d $(MSG_DOMAIN) \
+ --join-existing $$PYMSGFILES; \
+ fi; \
+ if [ ! -z "$$GLADEMSGFILES" ]; then \
+ $(GNUXGETTEXT) -o $@ $(GNUXGETFLAGS) --language=glade \
+ -d $(MSG_DOMAIN) --join-existing $$GLADEMSGFILES; \
+ fi; \
+ if [ ! -z "$$KSHMSGFILES" ]; then \
+ $(GNUXGETTEXT) -o $@ $(GNUXGETFLAGS) --language=Shell \
+ -d $(MSG_DOMAIN) --join-existing $$KSHMSGFILES; \
+ fi
# The use of TEXT_DOMAIN here is strange, but required for the normal
# message catalog build rules. (This would be better done with a
@@ -371,6 +393,7 @@
#
PKGPUBLISHER_REDIST= install-nightly
PKGPUBLISHER_NONREDIST= install-extra
+PKGPUBLISHER_LOCALIZABLE= install-localizable
# Default build rules which perform comment section post-processing.
@@ -441,14 +464,6 @@
$(POST_PROCESS_O)
$(RM) $*.c
-.po:
- $(COMPILE.po) $< > $<.i
- $(BUILD.po)
-
-.c.po:
- $(COMPILE.po) $< > $<.i
- $(BUILD.po)
-
.ksh:
$(RM) $@
cat $< > $@
@@ -470,4 +485,4 @@
-e "s,@DTD_VERSION_TARGET@,$(DTD_VERSION_TARGET),g" \
$< > $@
-.SUFFIXES: $(SUFFIXES) .po .ksh .ksh~ .src
+.SUFFIXES: $(SUFFIXES) .ksh .ksh~ .src
--- a/usr/src/README Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/README Sat Apr 07 07:57:13 2012 +0900
@@ -65,6 +65,7 @@
system/library/libdiskmgt/header-libdiskmgt
system/zones/internal
text/gnu-gettext
+ text/gnu-grep
text/locale
To get these packages, run "pkg install <package>"
--- a/usr/src/cmd/Makefile.targ Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/Makefile.targ Sat Apr 07 07:57:13 2012 +0900
@@ -71,7 +71,7 @@
$(ROOTMANSYSINS)/%: %
$(INS.file)
-$(ROOTUSRLIBMSGS)/%: %
+$(ROOTUSRSHAREMSGS)/%: %
$(INS.file)
$(ROOTPYTHONVENDOR):
--- a/usr/src/cmd/ai-webserver/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -23,6 +23,8 @@
# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_aiwebserver
+
include ../Makefile.cmd
all:= TARGET= all
@@ -30,6 +32,8 @@
clobber:= TARGET= clobber
install:= TARGET= install
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
PYMODULES= AI_database.py \
common_profile.py \
create_profile.py \
@@ -50,6 +54,8 @@
PYTHON_CGI= cgi_get_manifest.py
+MSGFILES= $(PYMODULES)
+
ROOTPYMODULES= $(PYMODULES:%=$(ROOTPYTHONVENDORINSTALLAI)/%)
ROOTPYCMODULES= $(PYCMODULES:%=$(ROOTPYTHONVENDORINSTALLAI)/%)
@@ -60,11 +66,12 @@
ROOTSCHEMAS= $(SCHEMAS:%=$(ROOTAUTOINST)/%)
-all: python
+all: python $(POFILE)
clean:
$(RM) *.pyc
$(RM) AI.db
+ $(RM) $(POFILE)
clobber: clean
@@ -74,7 +81,8 @@
$(ROOTVARAISVC) \
$(ROOTCGI_FILES) \
$(ROOTWEBSERVER_FILES) \
- $(ROOTSCHEMAS)
+ $(ROOTSCHEMAS) \
+ $(ROOTMSGS)
python:
$(PYTHON) -m compileall -l $(@D)
--- a/usr/src/cmd/ai-webserver/cgi_get_manifest.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/cgi_get_manifest.py Sat Apr 07 07:57:13 2012 +0900
@@ -665,7 +665,7 @@
print '</body></html>'
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
DEFAULT_PORT = libaimdns.getinteger_property(com.SRVINST, com.PORTPROP)
(PARAM_VERSION, SERVICE, NO_DEFAULT, FORM_DATA) = \
get_parameters(cgi.FieldStorage())
--- a/usr/src/cmd/ai-webserver/create_profile.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/create_profile.py Sat Apr 07 07:57:13 2012 +0900
@@ -361,5 +361,5 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
do_create_profile()
--- a/usr/src/cmd/ai-webserver/delete_manifest.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/delete_manifest.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
"""
AI delete-manifest
"""
@@ -190,7 +190,7 @@
raise SystemExit(error)
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/ai-webserver/delete_profile.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/delete_profile.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
"""
AI delete-profile
"""
@@ -158,5 +158,5 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
do_delete_profile()
--- a/usr/src/cmd/ai-webserver/export.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/export.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
'''
export - write out a manifest or profile
@@ -216,7 +216,7 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/ai-webserver/publish_manifest.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/publish_manifest.py Sat Apr 07 07:57:13 2012 +0900
@@ -578,7 +578,7 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/ai-webserver/set_criteria.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/set_criteria.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
"""
AI set-criteria
"""
@@ -316,7 +316,7 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/ai-webserver/test/test_cgi_get_manifest.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/test/test_cgi_get_manifest.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
'''test_cgi_get_manifest runs tests on the cgi_get_manifest.py cgi-bin script
'''
@@ -452,5 +452,5 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
unittest.main()
--- a/usr/src/cmd/ai-webserver/validate_profile.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/ai-webserver/validate_profile.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
"""
AI validate_profile
"""
@@ -147,5 +147,5 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_aiwebserver", "/usr/share/locale")
do_validate_profile()
--- a/usr/src/cmd/aimanifest/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/aimanifest/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -18,9 +18,11 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN= solaris_install_aimanifest
+
include ../Makefile.cmd
all:= TARGET= all
@@ -28,8 +30,6 @@
clobber:= TARGET= clobber
install:= TARGET= install
-MSG_DOMAIN= aimanifest
-
PYMODULES= aimanifest.py
PROGS= aimanifest
@@ -38,16 +38,18 @@
MSGFILES= $(PYMODULES)
-all: python $(PROGS)
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
+all: python $(PROGS) $(POFILE)
clean:
- $(RM) $(PROGS) aimanifest.pyc $(MSG_DOMAIN).po
+ $(RM) $(PROGS) aimanifest.pyc $(POFILE)
clobber: clean
install_h:
-install: all .WAIT $(ROOTPROGS) msgs
+install: all .WAIT $(ROOTPROGS) $(ROOTMSGS)
python:
$(PYTHON) -m compileall -l $(@D)
@@ -56,11 +58,4 @@
$(CP) aimanifest.py aimanifest
$(CHMOD) 755 aimanifest
-msgs: $(MSG_DOMAIN).po
-
-$(MSG_DOMAIN).po: $(PYMODULES)
- @echo "Making messages file $(MSG_DOMAIN).po"
- $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(MSG_DOMAIN) \
- $(MSGFILES)
-
include ../Makefile.targ
--- a/usr/src/cmd/aimanifest/aimanifest.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/aimanifest/aimanifest.py Sat Apr 07 07:57:13 2012 +0900
@@ -42,7 +42,7 @@
from solaris_install.logger import InstallLogger
from solaris_install.manifest_input.mim import ManifestInput
-_ = gettext.translation('aimanifest', '/usr/share/locale',
+_ = gettext.translation('solaris_install_aimanifest', '/usr/share/locale',
fallback=True).gettext
AIM_LOGGER = None
--- a/usr/src/cmd/auto-install/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/auto-install/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -19,8 +19,11 @@
# CDDL HEADER END
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
+
+MSG_DOMAIN = solaris_install_autoinstall
+
include ../Makefile.cmd
all:= TARGET= all
@@ -30,6 +33,8 @@
SUBDIRS= svc config checkpoints manifest profile test
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
PROGS= ai_get_manifest ai_sd auto-install
PYMODULES= \
@@ -53,7 +58,9 @@
ROOTAIFILES= $(AIFILES:%=$(ROOTAUTOINST)/%)
-all: python $(PROGS)
+MSGFILES = $(PYMODULES)
+
+all: python $(PROGS) $(POFILE)
install: all .WAIT $(ROOTPROGS) \
$(ROOTUSRBIN) \
@@ -63,7 +70,7 @@
$(ROOTPYTHONVENDORSOLINSTALLAI) \
$(ROOTAIFILES) \
$(ROOTPYMODULES) $(ROOTPYCMODULES) \
- $(SUBDIRS)
+ $(ROOTMSGS) $(SUBDIRS)
python:
$(PYTHON) -m compileall -l $(@D)
@@ -79,7 +86,7 @@
$(CP) ai_sd.py ai_sd
clean: $(SUBDIRS)
- $(RM) $(PROGS) $(PYCMODULES)
+ $(RM) $(PROGS) $(PYCMODULES) $(POFILE)
clobber: clean
--- a/usr/src/cmd/auto-install/ai_get_manifest.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/auto-install/ai_get_manifest.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
# ai_get_manifest - AI Service Choosing Engine
#
@@ -1151,7 +1151,7 @@
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if __name__ == "__main__":
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_autoinstall", "/usr/share/locale")
try:
RET_CODE = main()
except StandardError:
--- a/usr/src/cmd/auto-install/ai_sd.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/auto-install/ai_sd.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
# ai_sd - AI Service Discovery Engine
#
@@ -244,7 +244,7 @@
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if __name__ == "__main__":
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_autoinstall", "/usr/share/locale")
try:
RET_CODE = parse_cli(sys.argv)
except StandardError:
--- a/usr/src/cmd/auto-install/test/manual/test_ai_sd.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/auto-install/test/manual/test_ai_sd.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
# test_ai_sd - test for AI Service Discovery Engine
#
@@ -131,5 +131,5 @@
'did not find service (%s)' % self.SERVICE_NAME
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_autoinstall", "/usr/share/locale")
unittest.main()
--- a/usr/src/cmd/gui-install/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/gui-install/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -20,9 +20,11 @@
#
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_guiinstall
+
include ../Makefile.cmd
all:= TARGET= all
@@ -32,13 +34,18 @@
SUBDIRS= src pixmaps xml aux
-all: $(SUBDIRS)
+MSGFILES = src/*.py xml/*.xml
+
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
+all: $(SUBDIRS) $(POFILE)
clean: $(SUBDIRS)
+ rm -f *.pyc $(POFILE)
clobber: clean
-install: $(SUBDIRS)
+install: $(SUBDIRS) $(ROOTMSGS)
$(SUBDIRS): FRC
cd $@; pwd; echo $(TARGET); $(MAKE) $(TARGET)
--- a/usr/src/cmd/gui-install/src/__init__.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/gui-install/src/__init__.py Sat Apr 07 07:57:13 2012 +0900
@@ -268,7 +268,9 @@
def _init_locale():
'''Initialize the locale for gui-install'''
locale.setlocale(locale.LC_ALL, "")
- gettext.install("gui-install", "/usr/share/locale", unicode=True)
+ gettext.install("solaris_install_guiinstall",
+ "/usr/share/locale",
+ unicode=True)
def main():
--- a/usr/src/cmd/gui-install/src/gui_install_common.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/gui-install/src/gui_install_common.py Sat Apr 07 07:57:13 2012 +0900
@@ -44,7 +44,7 @@
from solaris_install.logger import INSTALL_LOGGER_NAME
# Define "_()" for gettext
-_ = gettext.translation("gui-install", "/usr/share/locale",
+_ = gettext.translation("solaris_install_guiinstall", "/usr/share/locale",
fallback=True).ugettext
# Dir which this executable is run from
--- a/usr/src/cmd/installadm/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -21,6 +21,8 @@
# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_installadm
+
include ../Makefile.cmd
all:= TARGET= all
@@ -28,6 +30,7 @@
clobber:= TARGET= clobber
install:= TARGET= install
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
SCRIPTS = check-server-setup \
installadm-common \
@@ -61,6 +64,8 @@
PYTHON_MODULES= aimdns.py aimdnsd.py
+MSGFILES = $(PYMODULES) $(PYTHON_MODULES) $(PYTHON_EXECS:%=%.py)
+
PYTHON_EXECS = installadm installadm-convert
PYCMODULES= $(PYMODULES:%.py=%.pyc)
@@ -81,13 +86,11 @@
SVCMETHODS= $(SVCMETHODSRC:%=$(ROOTLIBSVCMETHOD)/%)
$(SVCMETHODS) := FILEMODE= 0555
-MSG_DOMAIN = SUNW_INSTALL_INSTALLADM
-
.KEEP_STATE:
all: python $(PYTHON_EXECS) \
- $(SCRIPTS) $(CONF)
+ $(SCRIPTS) $(CONF) $(POFILE)
@true
python:
@@ -99,10 +102,8 @@
installadm-convert: installadm-convert.py
cp installadm-convert.py installadm-convert
-msgs: ${MSG_DOMAIN}.po
-
clean:
- rm -f $(SCRIPTS) *.pyc $(PYTHON_EXECS)
+ rm -f $(SCRIPTS) *.pyc $(PYTHON_EXECS) $(POFILE)
clobber: clean
@@ -111,7 +112,8 @@
$(ROOTPYCMODULES) $(ROOTPYSCRIPTS) $(SYSMANIFESTS) \
$(ROOTSCRIPTS) $(ROOTMANSYS) $(ROOTLIBSVCMETHOD) \
$(SVCMETHODS) $(ROOTPYTHONVENDORINSTALLAI) \
- $(SYSMANIFESTS) $(VARWEB)
+ $(SYSMANIFESTS) $(VARWEB) \
+ $(ROOTMSGS)
include ../Makefile.targ
--- a/usr/src/cmd/installadm/aimdns.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/aimdns.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
'''
Auto Installer mDNS and DNS Service Discovery class and application.
@@ -182,7 +182,7 @@
'''
atexit.register(on_exit)
try:
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
options = parse_options()
comments = options.comment
mdns.verbose = options.verbose
--- a/usr/src/cmd/installadm/aimdns_mod.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/aimdns_mod.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
'''
Auto Installer mDNS and DNS Service Discovery class and application.
@@ -73,7 +73,7 @@
the host about the available interfaces or the
AI SMF service.
'''
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
# find sdref handle
self._find = None
--- a/usr/src/cmd/installadm/aimdnsd.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/aimdnsd.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
'''
Auto Installer mDNS and DNS Service Discovery class and application.
@@ -202,7 +202,7 @@
'''
atexit.register(on_exit)
try:
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
options = parse_options()
mdns.verbose = options.verbose
--- a/usr/src/cmd/installadm/create_client.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/create_client.py Sat Apr 07 07:57:13 2012 +0900
@@ -197,5 +197,5 @@
if __name__ == "__main__":
# initialize gettext
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
do_create_client()
--- a/usr/src/cmd/installadm/create_service.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/create_service.py Sat Apr 07 07:57:13 2012 +0900
@@ -711,5 +711,5 @@
if __name__ == '__main__':
# initialize gettext
- gettext.install('ai', '/usr/lib/locale')
+ gettext.install('solaris_install_installadm', '/usr/share/locale')
do_create_service()
--- a/usr/src/cmd/installadm/delete_client.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/delete_client.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
'''
AI delete-client
'''
@@ -89,6 +89,6 @@
if __name__ == "__main__":
# initialize gettext
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
do_delete_client()
--- a/usr/src/cmd/installadm/delete_service.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/delete_service.py Sat Apr 07 07:57:13 2012 +0900
@@ -253,7 +253,7 @@
if __name__ == "__main__":
# initialize gettext
- gettext.install('ai', '/usr/lib/locale')
+ gettext.install('solaris_install_installadm', '/usr/share/locale')
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/installadm/installadm_common.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/installadm_common.py Sat Apr 07 07:57:13 2012 +0900
@@ -40,7 +40,9 @@
from solaris_install import Popen
-_ = gettext.translation('AI', '/usr/share/locale', fallback=True).gettext
+_ = gettext.translation('solaris_install_installadm',
+ '/usr/share/locale',
+ fallback=True).gettext
LOG_FORMAT = ("%(filename)s:%(lineno)d %(message)s")
--- a/usr/src/cmd/installadm/list.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/list.py Sat Apr 07 07:57:13 2012 +0900
@@ -1275,7 +1275,7 @@
if __name__ == '__main__':
# initialize gettext
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/installadm/rename_service.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/rename_service.py Sat Apr 07 07:57:13 2012 +0900
@@ -184,5 +184,5 @@
if __name__ == '__main__':
# initialize gettext
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
do_rename_service()
--- a/usr/src/cmd/installadm/set_service.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/set_service.py Sat Apr 07 07:57:13 2012 +0900
@@ -280,7 +280,7 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
# If invoked from the shell directly, mostly for testing,
# attempt to perform the action.
--- a/usr/src/cmd/installadm/test/manual/test_aimdns_manual.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/test/manual/test_aimdns_manual.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
'''Manual Testcase for aimdns
@@ -226,5 +226,5 @@
check_install_SMF()
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
unittest.main()
--- a/usr/src/cmd/installadm/test/test_aimdns.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/installadm/test/test_aimdns.py Sat Apr 07 07:57:13 2012 +0900
@@ -83,7 +83,7 @@
def test_registration_callback(self):
'''test registration callback output
'''
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
redirected = RedirectedOutput()
mdns = aimdns.AImDNS()
sys.stdout = redirected
@@ -139,7 +139,7 @@
mdns.timeout = 1
sys.stderr = redirected
# _ needs to get instantiated within the redirected output
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
mdns._resolved = list()
mdns._browse_callback(None, None, 0, pyb.kDNSServiceErr_NoError,
self.name, self.regtype, self.domain)
@@ -228,5 +228,5 @@
if __name__ == '__main__':
- gettext.install("ai", "/usr/lib/locale")
+ gettext.install("solaris_install_installadm", "/usr/share/locale")
unittest.main()
--- a/usr/src/cmd/js2ai/modules/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/js2ai/modules/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -18,9 +18,11 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_js2ai
+
include ../../Makefile.cmd
all:= TARGET= all
@@ -28,8 +30,6 @@
clobber:= TARGET= clobber
install:= TARGET= install
-MSG_DOMAIN = ../js2ai
-
SRCPYFILES = default_xml.py.src
GENERATEDPYFILES = default_xml.py
@@ -50,12 +50,14 @@
ROOTPYCMODULES= $(PYCMODULES:%=$(ROOTPYTHONVENDORSOLINSTALLJS2AI)/%)
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
MSGFILES = $(PYMODULES)
-all: python
+all: python .WAIT $(POFILE)
clean:
- rm -f $(PYCMODULES) $(GENERATEDPYFILES)
+ rm -f $(PYCMODULES) $(GENERATEDPYFILES) $(POFILE)
clobber: clean
@@ -64,18 +66,12 @@
$(ROOTPYTHONVENDORSOLINSTALLJS2AI) \
$(ROOTPYMODULES) \
$(ROOTPYCMODULES) \
- .WAIT msgs
+ $(ROOTMSGS) \
+ .WAIT
$(GENERATEDPYFILES):
python: $(GENERATEDPYFILES)
$(PYTHON) -m compileall -l $(@D)
-msgs: $(MSG_DOMAIN).po
-
-$(MSG_DOMAIN).po: $(PYMODULES)
- @echo "Making messages file $(MSG_DOMAIN).po"
- $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(MSG_DOMAIN) \
- $(MSGFILES)
-
include ../../Makefile.targ
--- a/usr/src/cmd/js2ai/modules/common.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/js2ai/modules/common.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
"""
Utility class
@@ -132,7 +132,9 @@
LVL_VALIDATION = logging.ERROR + 4
LVL_WARNING = logging.WARNING
-_ = gettext.translation("js2ai", "/usr/share/locale", fallback=True).gettext
+_ = gettext.translation("solaris_install_js2ai",
+ "/usr/share/locale",
+ fallback=True).gettext
def err(msg):
--- a/usr/src/cmd/system-config/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/system-config/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -21,6 +21,8 @@
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_systemconfig
+
include ../Makefile.cmd
all:= TARGET= all
@@ -28,8 +30,6 @@
clobber:= TARGET= clobber
install:= TARGET= install
-MSG_DOMAIN = system-config
-
SUBDIRS= helpfiles profile tools xslt
PROGS= sysconfig
@@ -54,11 +54,13 @@
ROOTPYCMODULES= $(PYCMODULES:%=$(ROOTPYTHONVENDORSCI)/%)
-MSGFILES = $(PYMODULES)
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
+MSGFILES = $(PYMODULES) profile/*.py
.KEEP_STATE:
-all: python $(PROGS)
+all: python $(PROGS) $(POFILE)
install: all .WAIT $(ROOTPROGS) \
$(ROOTPYTHONVENDOR) \
@@ -66,7 +68,7 @@
$(ROOTPYTHONVENDORSCI) \
$(ROOTPYMODULES) $(ROOTPYCMODULES) \
$(SUBDIRS) \
- .WAIT msgs
+ $(ROOTMSGS)
python:
@@ -75,20 +77,13 @@
install_h:
clean: $(SUBDIRS)
- rm -f *.pyc $(MSG_DOMAIN).po*
+ rm -f *.pyc $(POFILE)
clobber: clean
$(SUBDIRS): FRC
cd $@; pwd; echo $(TARGET); $(MAKE) $(TARGET)
-msgs: $(MSG_DOMAIN).po
-
-$(MSG_DOMAIN).po: $(PYMODULES)
- @echo "Making messages file $(MSG_DOMAIN).po"
- $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(MSG_DOMAIN) \
- $(MSGFILES)
-
sysconfig:
FRC:
--- a/usr/src/cmd/system-config/__init__.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/system-config/__init__.py Sat Apr 07 07:57:13 2012 +0900
@@ -45,7 +45,7 @@
from solaris_install.ict.apply_sysconfig import APPLY_SYSCONFIG_DICT, \
APPLY_SYSCONFIG_PROFILE_KEY
-_ = gettext.translation("sysconfig", "/usr/share/locale",
+_ = gettext.translation("solaris_install_systemconfig", "/usr/share/locale",
fallback=True).ugettext
SCI_HELP = "/usr/share/sysconfig/help"
COMMA = ","
@@ -1105,7 +1105,9 @@
"falling back to C.")
locale.setlocale(locale.LC_ALL, "C")
- gettext.install("sysconfig", "/usr/share/locale", unicode=True)
+ gettext.install("solaris_install_systemconfig",
+ "/usr/share/locale",
+ unicode=True)
set_wrap_on_whitespace(_("DONT_TRANSLATE_BUT_REPLACE_msgstr_WITH_True_"
"OR_False: Should wrap text on whitespace in"
" this language"))
--- a/usr/src/cmd/text-install/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/text-install/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -22,6 +22,8 @@
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_textinstall
+
include ../Makefile.cmd
all:= TARGET= all
@@ -31,7 +33,7 @@
SUBDIRS= svc helpfiles
-MSG_DOMAIN = textinstall
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
PROGS= text-install
@@ -65,10 +67,10 @@
.KEEP_STATE:
-all: python $(PROGS) $(SUBDIRS)
+all: python $(PROGS) $(SUBDIRS) $(POFILE)
clean: $(SUBDIRS)
- rm -f *.pyc $(MSG_DOMAIN).po*
+ rm -f *.pyc $(POFILE)
clobber: clean
@@ -78,18 +80,11 @@
$(ROOTPYTHONVENDORSOLINSTALLTI) \
$(ROOTPYMODULES) \
$(ROOTPYCMODULES) \
- .WAIT msgs
+ $(ROOTMSGS)
python:
$(PYTHON) -m compileall -l $(@D)
-msgs: $(MSG_DOMAIN).po
-
-$(MSG_DOMAIN).po: $(PYMODULES)
- @echo "Making messages file $(MSG_DOMAIN).po"
- $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(MSG_DOMAIN) \
- $(MSGFILES)
-
$(SUBDIRS): FRC
cd $@; pwd; echo $(TARGET); $(MAKE) $(TARGET)
--- a/usr/src/cmd/text-install/__init__.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/text-install/__init__.py Sat Apr 07 07:57:13 2012 +0900
@@ -53,7 +53,7 @@
# Variables used by modules this module imports
# Defined here to avoid circular import errors
-_ = gettext.translation("textinstall", "/usr/share/locale",
+_ = gettext.translation("solaris_install_textinstall", "/usr/share/locale",
fallback=True).ugettext
RELEASE = {"release": _("Oracle Solaris")}
TUI_HELP = "/usr/share/text-install/help"
@@ -321,7 +321,9 @@
def init_locale():
locale.setlocale(locale.LC_ALL, "")
- gettext.install("textinstall", "/usr/share/locale", unicode=True)
+ gettext.install("solaris_install_textinstall",
+ "/usr/share/locale",
+ unicode=True)
set_wrap_on_whitespace(_("DONT_TRANSLATE_BUT_REPLACE_msgstr_WITH_True_"
"OR_False: Should wrap text on whitespace in"
" this language"))
--- a/usr/src/cmd/text-install/svc/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/text-install/svc/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -18,11 +18,12 @@
#
# CDDL HEADER END
#
+
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
-#
+
+MSG_DOMAIN= solaris_install_text_menu
include $(SRC)/cmd/Makefile.cmd
@@ -34,11 +35,8 @@
PROG_KSH= text-mode-menu.ksh
PROG= $(PROG_KSH:%.ksh=%)
-MSG_DOMAIN= SUNW_INSTALL_TEXT_MENU
-POFILE= $(MSG_DOMAIN).po
-
ROOTPROGS= $(PROG:%=$(ROOTUSRSBIN)/%)
-ROOTMSGS= $(POFILE:%=$(ROOTUSRLIBMSGS)/%)
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
SYSMANIFESTSRC= text-mode-menu.xml
SYSMANIFESTS= $(SYSMANIFESTSRC:%=$(ROOTMANSYS)/%)
@@ -48,7 +46,7 @@
all: $(PROG) $(POFILE)
clean:
- rm -f $(ROOTPROGS) $(ROOTMSGS) $(SYSMANIFESTS)
+ rm -f $(ROOTPROGS) $(ROOTMSGS) $(SYSMANIFESTS) $(POFILE)
clobber: clean
@@ -60,9 +58,7 @@
msgs: $(POFILE)
-$(POFILE): $(PROG_KSH)
- @echo "Making messages file $(POFILE)"
- @$(ROOTADMINBIN)/xgetsh -d $(MSG_DOMAIN) $(PROG_KSH)
+MSGFILES = text-mode-menu.ksh
FRC:
--- a/usr/src/cmd/text-install/svc/text-mode-menu.ksh Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/cmd/text-install/svc/text-mode-menu.ksh Sat Apr 07 07:57:13 2012 +0900
@@ -20,12 +20,12 @@
# CDDL HEADER END
#
#
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
#
LANGUAGE_FILE=/etc/sysconfig/language
-export TEXTDOMAIN="SUNW_INSTALL_TEXT_MENU"
+export TEXTDOMAIN="solaris_install_text_menu"
# LOGNAME variable is needed to display the shell prompt appropriately
export LOGNAME=root
--- a/usr/src/lib/Makefile.targ Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/Makefile.targ Sat Apr 07 07:57:13 2012 +0900
@@ -85,10 +85,10 @@
$(ROOTUSRLIBBOOT):
$(INS.dir)
-$(ROOTUSRLIBMSGS):
+$(ROOTUSRSHAREMSGS):
$(INS.dir)
-$(ROOTUSRLIBMSGS)/%: %
+$(ROOTUSRSHAREMSGS)/%: %
$(INS.file)
$(ROOTPYTHON):
--- a/usr/src/lib/install_manifest_input/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/install_manifest_input/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -20,10 +20,10 @@
#
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
-MSG_DOMAIN= mim
+MSG_DOMAIN= solaris_install_mim
PYMODS= __init__.py mim.py process_dtd.py
@@ -34,14 +34,16 @@
MSGFILES= $(PYMODS)
CLOBBERFILES= $(PYCMODS)
-CLEANFILES= $(CLOBBERFILES) $(MSG_DOMAIN).po
+CLEANFILES= $(CLOBBERFILES) $(POFILE)
+
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
include ../Makefile.lib
python:
$(PYTHON) -m compileall -l $(@D)
-all: python
+all: python $(POFILE)
clobber: clean
@@ -53,13 +55,7 @@
$(ROOTPYTHONVENDORSOLINSTALLMANINPUT) \
$(ROOTPYMODS) \
$(ROOTPYCMODS) \
- msgs
-
-msgs: $(MSG_DOMAIN).po
-
-$(MSG_DOMAIN).po: $(PYMODS)
- @echo "Making messages file $(MSG_DOMAIN).po"
- $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(MSG_DOMAIN) \
- $(MSGFILES)
+ $(ROOTUSRSHAREMSGS) .WAIT \
+ $(ROOTMSGS)
include ../Makefile.targ
--- a/usr/src/lib/install_manifest_input/__init__.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/install_manifest_input/__init__.py Sat Apr 07 07:57:13 2012 +0900
@@ -21,7 +21,7 @@
#
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
""" Module body for manifest_input package
@@ -29,7 +29,9 @@
import gettext
-_ = gettext.translation("mim", "/usr/share/locale", fallback=True).gettext
+_ = gettext.translation("solaris_install_mim",
+ "/usr/share/locale",
+ fallback=True).gettext
# Errors created for this library.
--- a/usr/src/lib/libspmicommon/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/libspmicommon/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -20,8 +20,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
#
# SPMI common library makefile
@@ -68,10 +67,6 @@
LINTFILES = ${SRCS:%.c=${ARCH}/%.ln}
LINTFLAGS = -umx ${CPPFLAGS}
-CLOBBERFILES = *.po *.mo
-
-MSG_DOMAIN = SUNW_INSTALL_LIBCOMMON
-
.KEEP_STATE:
all: $(HDRS) .WAIT static dynamic
@@ -82,11 +77,11 @@
install: all .WAIT \
$(ROOTADMINLIB) .WAIT $(ROOTADMINLIBS) $(ROOTADMINLIBDYNLIB) \
- $(ROOTADMINLIBDYNLIBLINK) .WAIT msgs .WAIT $(INSTMSGS)
+ $(ROOTADMINLIBDYNLIBLINK)
install_test: all .WAIT \
$(ROOTADMINLIB) $(ROOTADMINLIBS) $(ROOTADMINLIBDYNLIB) \
- $(ROOTADMINLIBDYNLIBLINK) .WAIT $(INSTMSGS)
+ $(ROOTADMINLIBDYNLIBLINK)
install_h: $(ROOTUSRINCLEXP)
@@ -95,23 +90,6 @@
objs/$(ARCH)/common_proc.o \
objs/$(ARCH)/$(LIBRARY)
-msgs: ${MSG_DOMAIN}.po
-
-${MSG_DOMAIN}.po: ${SRCS} ${HDRS}
- @echo "Making messages file ${MSG_DOMAIN}.po"
- @${COMPILE.c} -C -E ${SRCS} 2>/dev/null | \
- xgettext -d ${MSG_DOMAIN} -s \
- -c "i18n:" - >/dev/null 2>&1
-
-# Create a message file with "translated" test strings.
-# Turn the po file into an mo file ready for testing.
-msgs_test: ${SRCS} ${HDRS}
- @echo "Making test messages file ${MSG_DOMAIN}.po"
- @${COMPILE.c} -C -E ${SRCS} 2>/dev/null | \
- xgettext -d ${MSG_DOMAIN} -s \
- -c "i18n:" -m "���!" - >/dev/null 2>&1
- @msgfmt -o ${MSG_DOMAIN}.mo ${MSG_DOMAIN}.po
-
lint: ${SRCS} ${HDRS}
${LINT.c} ${SRCS}
--- a/usr/src/lib/libspmicommon/common_misc.c Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/libspmicommon/common_misc.c Sat Apr 07 07:57:13 2012 +0900
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
*/
@@ -802,15 +801,15 @@
switch (errno) {
case ERR_MALLOC_FAIL:
- ret = dgettext("SUNW_INSTALL_SWLIB",
+ ret = dgettext("solaris_install_swlib",
"Allocation of memory failed");
break;
case ERR_IBE:
- ret = dgettext("SUNW_INSTALL_SWLIB",
+ ret = dgettext("solaris_install_swlib",
"Install failed. See /tmp/install_log for more details");
break;
default:
- ret = dgettext("SUNW_INSTALL_SWLIB", "Fatal Error");
+ ret = dgettext("solaris_install_swlib", "Fatal Error");
break;
}
--- a/usr/src/lib/libspmicommon/common_scriptwrite.c Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/libspmicommon/common_scriptwrite.c Sat Apr 07 07:57:13 2012 +0900
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
*/
@@ -66,11 +65,11 @@
* "DryRun @TOKEN0@ @TOKEN1@ ..."
* Followed by any text that will be printed on the screen.
* If the text needs translation, it will be of the form:
- * "gettext SUNW_INSTALL_LIBSVC The actual text...`"
+ * "gettext solaris_install_libsvc The actual text...`"
* Any tokens will be represented by $0n to avoid confusion during
* localization, and will be replaced by ther actual values before
* writing.
- * Also, the string "gettext SUNW_INSTALL_LIBSVC" will be
+ * Also, the string "gettext solaris_install_libsvc" will be
* stripped along with the trailing "`"
*
* If DryRun AND trace_level is set > 0, we'll still write the script.
@@ -142,7 +141,7 @@
dst++;
strcpy(ibuf, dst);
ibuf[strlen(ibuf)-1] = NULL;
- cp = dgettext("SUNW_INSTALL_LIBSVC", ibuf);
+ cp = dgettext("solaris_install_libsvc", ibuf);
}
}
/*
@@ -249,7 +248,7 @@
i++;
if (strncmp(cmdarray[i], "DryRun", 6)) {
write_message(SCR, WARNMSG, LEVEL0,
- dgettext("SUNW_INSTALL_LIBSVC",
+ dgettext("solaris_install_libsvc",
"Internal error: Dry Run message missing"));
/*
* Just use the shell script string
--- a/usr/src/lib/libspmicommon/common_strings.h Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/libspmicommon/common_strings.h Sat Apr 07 07:57:13 2012 +0900
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
*/
@@ -41,7 +40,7 @@
/* constants */
#ifndef TEXT_DOMAIN
-#define TEXT_DOMAIN "SUNW_INSTALL_LIBCOMMON"
+#define TEXT_DOMAIN "solaris_install_libcommon"
#endif
#ifndef ILIBSTR
--- a/usr/src/lib/terminalui/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/terminalui/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -19,9 +19,11 @@
# CDDL HEADER END
#
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
+MSG_DOMAIN = solaris_install_terminalui
+
include ../Makefile.lib
all:= TARGET= all
@@ -29,6 +31,8 @@
clobber:= TARGET= clobber
install:= TARGET= install
+ROOTMSGS= $(POFILE:%=$(ROOTUSRSHAREMSGS)/%)
+
PYMODULES= __init__.py \
action.py \
base_screen.py \
@@ -46,24 +50,27 @@
PYCMODULES= $(PYMODULES:%.py=%.pyc)
+MSGFILES = $(PYMODULES)
+
ROOTPROGS= $(PROGS:%=$(ROOTUSRBIN)/%)
ROOTPYMODULES= $(PYMODULES:%=$(ROOTPYTHONTERMUI)/%)
ROOTPYCMODULES= $(PYCMODULES:%=$(ROOTPYTHONTERMUI)/%)
-CLEANFILES= $(PYCMODULES)
+CLEANFILES= $(PYCMODULES) $(POFILE)
.KEEP_STATE:
-all: python
+all: python $(POFILE)
install: all .WAIT $(ROOTPROGS) \
$(ROOTPYTHONVENDOR) \
$(ROOTPYTHONTERMUI) \
$(ROOTPYMODULES) \
$(ROOTPYCMODULES) \
- .WAIT
+ $(ROOTUSRSHAREMSGS) .WAIT \
+ $(ROOTMSGS)
install_h:
--- a/usr/src/lib/terminalui/__init__.py Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/lib/terminalui/__init__.py Sat Apr 07 07:57:13 2012 +0900
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
@@ -42,7 +42,7 @@
import os
os.environ.setdefault("ESCDELAY", "200")
-_ = gettext.translation("terminalui", "/usr/share/locale",
+_ = gettext.translation("solaris_install_terminalui", "/usr/share/locale",
fallback=True).ugettext
LOG_NAME_INPUT = "INPUT"
LOG_LEVEL_INPUT = 5
--- a/usr/src/pkg/Makefile Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/pkg/Makefile Sat Apr 07 07:57:13 2012 +0900
@@ -237,7 +237,8 @@
DTD_VERSION_EXECUTION=$(DTD_VERSION_EXECUTION) \
DTD_VERSION_MEDIA_TRANSFER=$(DTD_VERSION_MEDIA_TRANSFER) \
DTD_VERSION_SOFTWARE=$(DTD_VERSION_SOFTWARE) \
- DTD_VERSION_TARGET=$(DTD_VERSION_TARGET)
+ DTD_VERSION_TARGET=$(DTD_VERSION_TARGET) \
+ PKGPUBLISHER_LOCALIZABLE=$(PKGPUBLISHER_LOCALIZABLE)
PKGDEP_TOKENS_i386= \
'PLATFORM=i86hvm' \
@@ -532,6 +533,7 @@
$(PKGDEBUG)pkgrepo create file://$(@)
$(PKGDEBUG)pkgrepo -s file://$(@) add-publisher $(PKGPUBLISHER)
$(PKGDEBUG)pkgrepo -s file://$(@) set publisher/prefix=$(PKGPUBLISHER)
+ $(PKGDEBUG)pkgrepo -s file://$(@) add-publisher $(PKGPUBLISHER_LOCALIZABLE)
#
# rule to process real manifests
--- a/usr/src/pkg/install-incorporation.mf Fri Apr 06 13:15:12 2012 -0700
+++ b/usr/src/pkg/install-incorporation.mf Sat Apr 07 07:57:13 2012 +0900
@@ -20,7 +20,7 @@
#
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri value=pkg:/consolidation/install/install-incorporation@$(PKGVERS)
@@ -35,3 +35,5 @@
<include packages.redist.noredist>
<include packages.redist.renamed>
#<include packages.redist.obsolete>
+# exclude localizable file package which is internal
+<transform depend fmri=pkg://$(PKGPUBLISHER_LOCALIZABLE)/ -> drop>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkg/manifests/install-message-files.mf Sat Apr 07 07:57:13 2012 +0900
@@ -0,0 +1,126 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr/share/locale/C/(.*) -> set action.hash usr/share/locale/C/%<1>>
+<transform file path=usr/share/locale/C/(.*) -> set path usr/share/locale/__LOCALE__/%<1>>
+
+<transform file path=usr/share/gui-install/help/C/(.*) -> set action.hash usr/share/gui-install/help/C/%<1>>
+<transform file path=usr/share/gui-install/help/C/(.*) -> set path usr/share/gui-install/help/__LOCALE__/%<1>>
+
+<transform file path=usr/share/sysconfig/help/C/(.*) -> set action.hash usr/share/sysconfig/help/C/%<1>>
+<transform file path=usr/share/sysconfig/help/C/(.*) -> set path usr/share/sysconfig/help/__LOCALE__/%<1>>
+
+<transform file path=usr/share/text-install/help/C/(.*) -> set action.hash usr/share/text-install/help/C/%<1>>
+<transform file path=usr/share/text-install/help/C/(.*) -> set path usr/share/text-install/help/__LOCALE__/%<1>>
+set name=pkg.fmri \
+ value=pkg://$(PKGPUBLISHER_LOCALIZABLE)/consolidation/install/install-message-files@$(PKGVERS)
+set name=pkg.summary value="Installer messages"
+set name=pkg.description \
+ value="Translatable content from Installer and tools. This is package is for internal use."
+set name=info.classification \
+ value="org.opensolaris.category.2008:System/Administration and Configuration"
+set name=org.opensolaris.redist-pkg value=noredist
+set name=variant.arch value=$(ARCH)
+dir path=usr group=sys
+dir path=usr/include
+dir path=usr/share group=sys
+dir path=usr/share/gui-install group=sys
+dir path=usr/share/gui-install/help group=sys
+dir path=usr/share/gui-install/help/C group=sys
+file path=usr/share/gui-install/help/C/FINISH_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_DISK_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_FAILURE_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_LANGUAGE_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_PROGRESS_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_REVIEW_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_TIMEZONE_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/INSTALL_USERS_PANEL.txt group=sys
+file path=usr/share/gui-install/help/C/WELCOME_PANEL.txt group=sys
+dir path=usr/share/gui-install/installmessages group=sys
+dir path=usr/share/gui-install/installmessages/C group=sys
+file path=usr/share/gui-install/installmessages/C/imageurl.txt group=sys
+file path=usr/share/gui-install/installmessages/C/install-01.png group=sys
+file path=usr/share/gui-install/installmessages/C/install-02.png group=sys
+file path=usr/share/gui-install/installmessages/C/install-03.png group=sys
+file path=usr/share/gui-install/installmessages/C/install-04.png group=sys
+file path=usr/share/gui-install/installmessages/C/install-05.png group=sys
+file path=usr/share/gui-install/installmessages/C/install-06.png group=sys
+dir path=usr/share/locale group=other
+dir path=usr/share/locale/C group=other
+dir path=usr/share/locale/C/LC_MESSAGES group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_aimanifest.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_aiwebserver.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_autoinstall.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_guiinstall.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_installadm.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_js2ai.po group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_mim.po group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_systemconfig.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_terminalui.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_text_menu.po \
+ group=other
+file path=usr/share/locale/C/LC_MESSAGES/solaris_install_textinstall.po \
+ group=other
+dir path=usr/share/sysconfig group=sys
+dir path=usr/share/sysconfig/help group=sys
+dir path=usr/share/sysconfig/help/C group=sys
+file path=usr/share/sysconfig/help/C/date_time.txt group=sys
+file path=usr/share/sysconfig/help/C/dns_search.txt group=sys
+file path=usr/share/sysconfig/help/C/dns_server.txt group=sys
+file path=usr/share/sysconfig/help/C/domain.txt group=sys
+file path=usr/share/sysconfig/help/C/ldap_profile.txt group=sys
+file path=usr/share/sysconfig/help/C/ldap_proxy.txt group=sys
+file path=usr/share/sysconfig/help/C/name_service.txt group=sys
+file path=usr/share/sysconfig/help/C/network.txt group=sys
+file path=usr/share/sysconfig/help/C/network_manual.txt group=sys
+file path=usr/share/sysconfig/help/C/nis.txt group=sys
+file path=usr/share/sysconfig/help/C/summary.txt group=sys
+file path=usr/share/sysconfig/help/C/support_main.txt group=sys
+file path=usr/share/sysconfig/help/C/support_net_config.txt group=sys
+file path=usr/share/sysconfig/help/C/timezone.txt group=sys
+file path=usr/share/sysconfig/help/C/users.txt group=sys
+file path=usr/share/sysconfig/help/C/welcome.txt group=sys
+dir path=usr/share/text-install group=sys
+dir path=usr/share/text-install/help group=sys
+dir path=usr/share/text-install/help/C group=sys
+file path=usr/share/text-install/help/C/disks.txt group=sys
+file path=usr/share/text-install/help/C/sparc_solaris_slices.txt group=sys
+file path=usr/share/text-install/help/C/sparc_solaris_slices_select.txt \
+ group=sys
+file path=usr/share/text-install/help/C/summary.txt group=sys
+file path=usr/share/text-install/help/C/welcome.txt group=sys
+file path=usr/share/text-install/help/C/x86_fdisk_partitions.txt group=sys
+file path=usr/share/text-install/help/C/x86_fdisk_partitions_select.txt \
+ group=sys
+file path=usr/share/text-install/help/C/x86_fdisk_slices.txt group=sys
+file path=usr/share/text-install/help/C/x86_fdisk_slices_select.txt group=sys
+license cr_Sun license=cr_Sun