[PATCH] [Wok 0/3] Fix Sample plugin

Aline Manera (3): Bug fix #7: Do not include Sample plugin files on Wok build Remove unnecessary directories from Sample plugin structure Bug fix #177: Fix Sample plugin according to latest changes on Wok .gitignore | 1 - IBM-license-blacklist | 3 - configure.ac | 23 -- src/wok/plugins/Makefile.am | 2 - src/wok/plugins/sample/Makefile.am | 31 -- src/wok/plugins/sample/__init__.py | 80 +---- src/wok/plugins/sample/config.status | 1 - src/wok/plugins/sample/model.py | 37 +- src/wok/plugins/sample/po/Makefile.in.in | 391 --------------------- src/wok/plugins/sample/po/Makevars | 41 --- src/wok/plugins/sample/po/POTFILES.in | 4 +- src/wok/plugins/sample/po/en_US.po | 48 ++- src/wok/plugins/sample/po/gen-pot | 28 -- src/wok/plugins/sample/po/pt_BR.po | 48 ++- src/wok/plugins/sample/po/sample.pot | 48 ++- src/wok/plugins/sample/po/update-po | 34 ++ src/wok/plugins/sample/po/zh_CN.po | 48 ++- src/wok/plugins/sample/root.py | 171 +++++++++ src/wok/plugins/sample/sample.conf | 3 + src/wok/plugins/sample/sample.conf.in | 27 -- src/wok/plugins/sample/ui/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/tab-ext.xml | 13 +- src/wok/plugins/sample/ui/css/.gitignore | 0 src/wok/plugins/sample/ui/images/.gitignore | 0 src/wok/plugins/sample/ui/images/sample.svg | 45 +++ src/wok/plugins/sample/ui/js/Makefile.am | 22 -- src/wok/plugins/sample/ui/libs/.gitignore | 0 src/wok/plugins/sample/ui/pages/Makefile.am | 22 -- src/wok/plugins/sample/ui/pages/i18n.json.tmpl | 3 +- .../plugins/sample/ui/pages/sample-tab1.html.tmpl | 32 -- .../plugins/sample/ui/pages/sample-tab2.html.tmpl | 32 -- .../sample/ui/pages/tabs/sample-tab1.html.tmpl | 39 ++ .../sample/ui/pages/tabs/sample-tab2.html.tmpl | 39 ++ 34 files changed, 553 insertions(+), 807 deletions(-) delete mode 100644 src/wok/plugins/sample/Makefile.am delete mode 120000 src/wok/plugins/sample/config.status delete mode 100644 src/wok/plugins/sample/po/Makefile.in.in delete mode 100644 src/wok/plugins/sample/po/Makevars delete mode 100755 src/wok/plugins/sample/po/gen-pot create mode 100755 src/wok/plugins/sample/po/update-po create mode 100644 src/wok/plugins/sample/root.py create mode 100644 src/wok/plugins/sample/sample.conf delete mode 100644 src/wok/plugins/sample/sample.conf.in delete mode 100644 src/wok/plugins/sample/ui/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/config/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/css/.gitignore delete mode 100644 src/wok/plugins/sample/ui/images/.gitignore create mode 100644 src/wok/plugins/sample/ui/images/sample.svg delete mode 100644 src/wok/plugins/sample/ui/js/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/libs/.gitignore delete mode 100644 src/wok/plugins/sample/ui/pages/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl -- 2.7.4

The Sample plugin is just to guide new plugin development and should not impact Wok build. Also Sample plugin is simple enough to really need a build process, so remove all Makefile files. Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com> --- IBM-license-blacklist | 2 - configure.ac | 23 -- src/wok/plugins/Makefile.am | 2 - src/wok/plugins/sample/Makefile.am | 31 --- src/wok/plugins/sample/config.status | 1 - src/wok/plugins/sample/po/Makefile.in.in | 391 --------------------------- src/wok/plugins/sample/po/Makevars | 41 --- src/wok/plugins/sample/sample.conf.in | 2 +- src/wok/plugins/sample/ui/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/Makefile.am | 22 -- src/wok/plugins/sample/ui/js/Makefile.am | 22 -- src/wok/plugins/sample/ui/pages/Makefile.am | 22 -- 12 files changed, 1 insertion(+), 580 deletions(-) delete mode 100644 src/wok/plugins/sample/Makefile.am delete mode 120000 src/wok/plugins/sample/config.status delete mode 100644 src/wok/plugins/sample/po/Makefile.in.in delete mode 100644 src/wok/plugins/sample/po/Makevars delete mode 100644 src/wok/plugins/sample/ui/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/config/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/js/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/pages/Makefile.am diff --git a/IBM-license-blacklist b/IBM-license-blacklist index a1e07db..e0188ba 100644 --- a/IBM-license-blacklist +++ b/IBM-license-blacklist @@ -32,8 +32,6 @@ src/wok.conf.in src/wok/API.json src/wok/plugins/sample/API.json src/wok/plugins/sample/po/LINGUAS -src/wok/plugins/sample/po/Makefile.in.in -src/wok/plugins/sample/po/Makevars src/wok/plugins/sample/po/POTFILES.in src/wok/plugins/sample/po/sample.pot src/wok/plugins/sample/sample.conf.in diff --git a/configure.ac b/configure.ac index ff41c84..2ba96c0 100644 --- a/configure.ac +++ b/configure.ac @@ -51,22 +51,6 @@ if test "x$PYFLAKES" = "x"; then AC_MSG_WARN([pyflakes not found]) fi -AC_ARG_ENABLE( - [sample], - [AS_HELP_STRING( - [--enable-sample], - [enable sample plugin @<:@default=no@:>@] - )], - , - [enable_sample="no"] -) - -if test "${enable_sample}" = "yes"; then -AC_SUBST([ENABLE_SAMPLE], [True]) -else -AC_SUBST([ENABLE_SAMPLE], [False]) -fi - # check for systemd PKG_PROG_PKG_CONFIG AC_ARG_WITH([systemdsystemunitdir], @@ -99,13 +83,6 @@ AC_CONFIG_FILES([ src/wok/model/Makefile src/wok/xmlutils/Makefile src/wok/plugins/Makefile - src/wok/plugins/sample/Makefile - src/wok/plugins/sample/po/Makefile.in - src/wok/plugins/sample/sample.conf - src/wok/plugins/sample/ui/Makefile - src/wok/plugins/sample/ui/config/Makefile - src/wok/plugins/sample/ui/js/Makefile - src/wok/plugins/sample/ui/pages/Makefile ui/Makefile ui/base64/Makefile ui/css/Makefile diff --git a/src/wok/plugins/Makefile.am b/src/wok/plugins/Makefile.am index edbb39a..29a9a7c 100644 --- a/src/wok/plugins/Makefile.am +++ b/src/wok/plugins/Makefile.am @@ -19,8 +19,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -SUBDIRS = sample - plugins_PYTHON = \ __init__.py diff --git a/src/wok/plugins/sample/Makefile.am b/src/wok/plugins/sample/Makefile.am deleted file mode 100644 index 7ba2574..0000000 --- a/src/wok/plugins/sample/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Project Wok -# -# Copyright IBM Corp, 2015-2016 -# -# Code derived from Project Kimchi -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -SUBDIRS = ui po - -EXTRA_DIST = API.json sample.conf.in $(wildcard *.py) config.status - -all-local: - while read L && test -n "$$L"; do \ - dir=mo/$$L/LC_MESSAGES ; \ - $(MKDIR_P) $$dir ; \ - ln -sf ../../../po/$$L.gmo $$dir/sample.mo ; \ - done < po/LINGUAS diff --git a/src/wok/plugins/sample/config.status b/src/wok/plugins/sample/config.status deleted file mode 120000 index 7297963..0000000 --- a/src/wok/plugins/sample/config.status +++ /dev/null @@ -1 +0,0 @@ -../../../../config.status \ No newline at end of file diff --git a/src/wok/plugins/sample/po/Makefile.in.in b/src/wok/plugins/sample/po/Makefile.in.in deleted file mode 100644 index 62e9dae..0000000 --- a/src/wok/plugins/sample/po/Makefile.in.in +++ /dev/null @@ -1,391 +0,0 @@ -# Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu> -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU General Public -# License but which still want to provide support for the GNU gettext -# functionality. -# Please note that the actual code of GNU gettext is covered by the GNU -# General Public License and is *not* in the public domain. -# -# Origin: gettext-0.18 -GETTEXT_MACRO_VERSION = 0.18 - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - -SHELL = /bin/sh -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ -datadir = @datadir@ -localedir = @prefix@/share/locale -gettextsrcdir = $(datadir)/gettext/po - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -# We use $(MKDIR_P). -# This macro uses the 'mkdir -p' command if possible. Otherwise, it falls back -# on invoking install-sh with the -d option, so your package should contain -# install-sh as described under AC_PROG_INSTALL. -mkinstalldirs = $(SHELL) @install_sh@ -d -install_sh = $(SHELL) @install_sh@ -MKDIR_P = @MKDIR_P@ -MKDIR_P = @MKDIR_P@ - -GMSGFMT_ = @GMSGFMT@ -GMSGFMT_no = @GMSGFMT@ -GMSGFMT_yes = @GMSGFMT_015@ -GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) -MSGFMT_ = @MSGFMT@ -MSGFMT_no = @MSGFMT@ -MSGFMT_yes = @MSGFMT_015@ -MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) -XGETTEXT_ = @XGETTEXT@ -XGETTEXT_no = @XGETTEXT@ -XGETTEXT_yes = @XGETTEXT_015@ -XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) -MSGMERGE = msgmerge -MSGMERGE_UPDATE = @MSGMERGE@ --update -MSGINIT = msginit -MSGCONV = msgconv -MSGFILTER = msgfilter - -POFILES = @POFILES@ -GMOFILES = @GMOFILES@ -UPDATEPOFILES = @UPDATEPOFILES@ -DUMMYPOFILES = @DUMMYPOFILES@ -DISTFILES.common = Makefile.in.in \ -$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) -DISTFILES = $(DISTFILES.common) Makevars POTFILES.in gen-pot \ -$(POFILES) $(GMOFILES) \ -$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) - -POTFILES = \ - -CATALOGS = @CATALOGS@ - -# Makevars gets inserted here. (Don't remove this line!) - -.SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update - -.po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ - -.po.gmo: - @lang=`echo $* | sed -e 's,.*/,,'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo - -.sin.sed: - sed -e '/^#/d' $< > t-$@ - mv t-$@ $@ - - -all: check-macro-version update-gmo all-@USE_NLS@ - -all-yes: stamp-po -all-no: - -# Ensure that the gettext macros and this Makefile.in.in are in sync. -check-macro-version: - @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ - || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ - exit 1; \ - } - -# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no -# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because -# we don't want to bother translators with empty POT files). We assume that -# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. -# In this case, stamp-po is a nop (i.e. a phony target). - -# stamp-po is a timestamp denoting the last time at which the CATALOGS have -# been loosely updated. Its purpose is that when a developer or translator -# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -# invocations of "make" will do nothing. This timestamp would not be necessary -# if updating the $(CATALOGS) would always touch them; however, the rule for -# $(POFILES) has been designed to not touch files that don't need to be -# changed. -stamp-po: $(srcdir)/$(DOMAIN).pot - test ! -f $(srcdir)/$(DOMAIN).pot || \ - test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) - @test ! -f $(srcdir)/$(DOMAIN).pot || { \ - echo "touch stamp-po" && \ - echo timestamp > stamp-poT && \ - mv stamp-poT stamp-po; \ - } - -# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', -# otherwise packages like GCC can not be built if only parts of the source -# have been downloaded. - -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in - $(srcdir)/gen-pot $(POTFILES) - -# This rule has no dependencies: we don't need to update $(DOMAIN).pot at -# every "make" invocation, only create it when it is missing. -# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. -$(srcdir)/$(DOMAIN).pot: - $(MAKE) $(DOMAIN).pot-update - -# This target rebuilds a PO file if $(DOMAIN).pot has changed. -# Note that a PO file is not touched if it doesn't need to be changed. -$(POFILES): $(srcdir)/$(DOMAIN).pot - @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - if test -f "$(srcdir)/$${lang}.po"; then \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) \ - && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ - *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ - esac; \ - }; \ - else \ - $(MAKE) $${lang}.po-create; \ - fi - - -install: - -install-exec: -install-data: install-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ - for file in $(DISTFILES.common) Makevars.template; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - for file in Makevars; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -install-data-no: all -install-data-yes: all - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(MKDIR_P) $(DESTDIR)$$dir; \ - if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ - $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ - echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ - fi; \ - done; \ - done - -install-strip: install - -installdirs: installdirs-exec installdirs-data -installdirs-exec: -installdirs-data: installdirs-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi -installdirs-data-no: -installdirs-data-yes: - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(MKDIR_P) $(DESTDIR)$$dir; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - fi; \ - done; \ - done - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - -uninstall-exec: -uninstall-data: uninstall-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in $(DISTFILES.common) Makevars.template; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -uninstall-data-no: -uninstall-data-yes: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - done; \ - done - -check: all - -info dvi ps pdf html tags TAGS ctags CTAGS ID: - -mostlyclean: - rm -f remove-potcdate.sed - rm -f stamp-poT - rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po - rm -fr *.o - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f stamp-po $(GMOFILES) - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: - @$(MAKE) dist2 -# This is a separate target because 'update-po' must be executed before. -dist2: stamp-po $(DISTFILES) - dists="$(DISTFILES)"; \ - if test "$(PACKAGE)" = "gettext-tools"; then \ - dists="$$dists Makevars.template"; \ - fi; \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - dists="$$dists $(DOMAIN).pot stamp-po"; \ - fi; \ - if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ - for file in $$dists; do \ - if test -f $$file; then \ - cp -p $$file $(distdir) || exit 1; \ - else \ - cp -p $(srcdir)/$$file $(distdir) || exit 1; \ - fi; \ - done - -update-po: Makefile - $(MAKE) $(DOMAIN).pot-update - test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) - $(MAKE) update-gmo - -# General rule for creating PO files. - -.nop.po-create: - @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ - echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ - exit 1 - -# General rule for updating PO files. - -.nop.po-update: - @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ - cd $(srcdir); \ - if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ - *) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ - esac; \ - }; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -$(DUMMYPOFILES): - -update-gmo: Makefile $(GMOFILES) - @: - -# Recreate Makefile by invoking config.status. Explicitly invoke the shell, -# because execution permission bits may not work on the current file system. -# Use @SHELL@, which is the shell determined by autoconf for the use by its -# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. -Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ - cd $(top_builddir) \ - && @SHELL@ ./config.status $(subdir)/$@.in po-directories - -force: - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/wok/plugins/sample/po/Makevars b/src/wok/plugins/sample/po/Makevars deleted file mode 100644 index 60de3f1..0000000 --- a/src/wok/plugins/sample/po/Makevars +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = sample - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = kimchi-devel@ovirt.org - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/src/wok/plugins/sample/sample.conf.in b/src/wok/plugins/sample/sample.conf.in index 9da33e1..75ea5b0 100644 --- a/src/wok/plugins/sample/sample.conf.in +++ b/src/wok/plugins/sample/sample.conf.in @@ -1,5 +1,5 @@ [wok] -enable = @ENABLE_SAMPLE@ +enable = False plugin_class = "Drawings" uri = "/plugins/sample" diff --git a/src/wok/plugins/sample/ui/Makefile.am b/src/wok/plugins/sample/ui/Makefile.am deleted file mode 100644 index 2b4ee1e..0000000 --- a/src/wok/plugins/sample/ui/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# -# Project Wok -# -# Copyright IBM Corp, 2015-2016 -# -# Code derived from Project Kimchi -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -SUBDIRS = config js pages diff --git a/src/wok/plugins/sample/ui/config/Makefile.am b/src/wok/plugins/sample/ui/config/Makefile.am deleted file mode 100644 index d3663dd..0000000 --- a/src/wok/plugins/sample/ui/config/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# -# Project Wok -# -# Copyright IBM Corp, 2015-2016 -# -# Code derived from Project Kimchi -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -EXTRA_DIST = tab-ext.xml diff --git a/src/wok/plugins/sample/ui/js/Makefile.am b/src/wok/plugins/sample/ui/js/Makefile.am deleted file mode 100644 index 46bfe29..0000000 --- a/src/wok/plugins/sample/ui/js/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# -# Project Wok -# -# Copyright IBM Corp, 2015-2016 -# -# Code derived from Project Kimchi -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -EXTRA_DIST = util.js diff --git a/src/wok/plugins/sample/ui/pages/Makefile.am b/src/wok/plugins/sample/ui/pages/Makefile.am deleted file mode 100644 index f1774dc..0000000 --- a/src/wok/plugins/sample/ui/pages/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# -# Project Wok -# -# Copyright IBM Corp, 2015-2016 -# -# Code derived from Project Kimchi -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -EXTRA_DIST = i18n.json.tmpl sample-tab1.html.tmpl sample-tab2.html.tmpl -- 2.7.4

There is no file under css/, images/ and libs/ so there is no need to keep them in the Sample plugin structure. Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com> --- src/wok/plugins/sample/ui/css/.gitignore | 0 src/wok/plugins/sample/ui/images/.gitignore | 0 src/wok/plugins/sample/ui/libs/.gitignore | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/wok/plugins/sample/ui/css/.gitignore delete mode 100644 src/wok/plugins/sample/ui/images/.gitignore delete mode 100644 src/wok/plugins/sample/ui/libs/.gitignore diff --git a/src/wok/plugins/sample/ui/css/.gitignore b/src/wok/plugins/sample/ui/css/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/src/wok/plugins/sample/ui/images/.gitignore b/src/wok/plugins/sample/ui/images/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/src/wok/plugins/sample/ui/libs/.gitignore b/src/wok/plugins/sample/ui/libs/.gitignore deleted file mode 100644 index e69de29..0000000 -- 2.7.4

This patch: - moves API configuration from sample.conf.in to root.py - adds /config API to return Sample version - adds Wok log as Sample logo to be displayed when Sample is enabled - does not auto generate sample.conf from sample.conf.in - moves HTML files under ui/pages/tabs - updates tab-ext.xml file to add plugin color Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com> --- .gitignore | 1 - IBM-license-blacklist | 1 - src/wok/plugins/sample/__init__.py | 80 +--------- src/wok/plugins/sample/model.py | 37 +++-- src/wok/plugins/sample/po/POTFILES.in | 4 +- src/wok/plugins/sample/po/en_US.po | 48 +++++- src/wok/plugins/sample/po/gen-pot | 28 ---- src/wok/plugins/sample/po/pt_BR.po | 48 +++++- src/wok/plugins/sample/po/sample.pot | 48 +++++- src/wok/plugins/sample/po/update-po | 34 ++++ src/wok/plugins/sample/po/zh_CN.po | 48 +++++- src/wok/plugins/sample/root.py | 171 +++++++++++++++++++++ src/wok/plugins/sample/sample.conf | 3 + src/wok/plugins/sample/sample.conf.in | 27 ---- src/wok/plugins/sample/ui/config/tab-ext.xml | 13 +- src/wok/plugins/sample/ui/images/sample.svg | 45 ++++++ src/wok/plugins/sample/ui/pages/i18n.json.tmpl | 3 +- .../plugins/sample/ui/pages/sample-tab1.html.tmpl | 32 ---- .../plugins/sample/ui/pages/sample-tab2.html.tmpl | 32 ---- .../sample/ui/pages/tabs/sample-tab1.html.tmpl | 39 +++++ .../sample/ui/pages/tabs/sample-tab2.html.tmpl | 39 +++++ 21 files changed, 553 insertions(+), 228 deletions(-) delete mode 100755 src/wok/plugins/sample/po/gen-pot create mode 100755 src/wok/plugins/sample/po/update-po create mode 100644 src/wok/plugins/sample/root.py create mode 100644 src/wok/plugins/sample/sample.conf delete mode 100644 src/wok/plugins/sample/sample.conf.in create mode 100644 src/wok/plugins/sample/ui/images/sample.svg delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl diff --git a/.gitignore b/.gitignore index d06f936..8e2e115 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ src/wok/config.py tests/run_tests.sh tests/test_config.py src/wok/plugins/sample/po/POTFILES -src/wok/plugins/sample/sample.conf ui/pages/help/*/*.html po/POTFILES po/gen-pot diff --git a/IBM-license-blacklist b/IBM-license-blacklist index e0188ba..79243a9 100644 --- a/IBM-license-blacklist +++ b/IBM-license-blacklist @@ -34,7 +34,6 @@ src/wok/plugins/sample/API.json src/wok/plugins/sample/po/LINGUAS src/wok/plugins/sample/po/POTFILES.in src/wok/plugins/sample/po/sample.pot -src/wok/plugins/sample/sample.conf.in src/wok/plugins/sample/ui/config/tab-ext.xml src/wok/plugins/sample/ui/pages/help/en_US/.*.html ui/base64/README.md diff --git a/src/wok/plugins/sample/__init__.py b/src/wok/plugins/sample/__init__.py index ff96b15..3baf416 100644 --- a/src/wok/plugins/sample/__init__.py +++ b/src/wok/plugins/sample/__init__.py @@ -19,81 +19,5 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -import json -import os -from cherrypy import expose - - -from wok.config import PluginPaths -from wok.control.base import Collection, Resource -from wok.root import WokRoot - - -from plugins.sample.i18n import messages -from plugins.sample.model import Model - - -model = Model() - - -class Drawings(WokRoot): - def __init__(self, wok_options): - Resource.__init__(self, model) - self.description = Description(model) - self.rectangles = Rectangles(model) - self.circles = Circles(model) - self.paths = PluginPaths('sample') - self.domain = 'sample' - self.messages = messages - self.api_schema = json.load(open(os.path.join(os.path.dirname( - os.path.abspath(__file__)), 'API.json'))) - - @expose - def index(self): - return 'This is a sample plugin for Wok' - - -class Description(Resource): - def __init__(self, model): - super(Description, self).__init__(model) - - @property - def data(self): - return {'name': 'sample', 'version': '0.1'} - - -class Circles(Collection): - def __init__(self, model): - super(Circles, self).__init__(model) - self.resource = Circle - self.admin_methods = ['POST', 'PUT'] - - -class Rectangles(Collection): - def __init__(self, model): - super(Rectangles, self).__init__(model) - self.resource = Rectangle - self.admin_methods = ['POST', 'PUT'] - - -class Circle(Resource): - def __init__(self, model, ident): - super(Circle, self).__init__(model, ident) - self.update_params = ['radius'] - - @property - def data(self): - ret = {'name': self.ident} - ret.update(self.info) - return ret - - -class Rectangle(Resource): - def __init__(self, model, ident): - super(Rectangle, self).__init__(model, ident) - self.update_params = ['length', 'width'] - - @property - def data(self): - self.info.update({'name': self.ident}) - return self.info +from wok.plugins.sample.root import Sample +__all__ = [Sample] diff --git a/src/wok/plugins/sample/model.py b/src/wok/plugins/sample/model.py index 489aa15..6bfc6b1 100644 --- a/src/wok/plugins/sample/model.py +++ b/src/wok/plugins/sample/model.py @@ -23,6 +23,14 @@ from wok.basemodel import BaseModel from wok.exception import InvalidOperation, NotFoundError +class ConfigModel(object): + def __init__(self): + pass + + def lookup(self, *name): + return {'version': '2.3.0'} + + class CirclesModel(object): def __init__(self): self._circles = {} @@ -110,18 +118,6 @@ class RectangleModel(object): pass -class Model(BaseModel): - def __init__(self): - circles = CirclesModel() - circle = CircleModel(circles) - - rectangles = RectanglesModel() - rectangle = RectangleModel(rectangles) - - return super(Model, self).__init__( - [circle, circles, rectangle, rectangles]) - - class Rectangle(object): def __init__(self, length, width): self.length = length @@ -131,3 +127,20 @@ class Rectangle(object): class Circle(object): def __init__(self, radius): self.radius = radius + + +""" +All model instances must be grouped into one Model class as below. +""" +class Model(BaseModel): + def __init__(self): + config = ConfigModel() + + circles = CirclesModel() + circle = CircleModel(circles) + + rectangles = RectanglesModel() + rectangle = RectangleModel(rectangles) + + return super(Model, self).__init__( + [config, circle, circles, rectangle, rectangles]) diff --git a/src/wok/plugins/sample/po/POTFILES.in b/src/wok/plugins/sample/po/POTFILES.in index 0aaf102..1055573 100644 --- a/src/wok/plugins/sample/po/POTFILES.in +++ b/src/wok/plugins/sample/po/POTFILES.in @@ -1,2 +1,2 @@ -# List of source files which contain translatable strings. -src/wok/plugins/sample/ui/pages/*.tmpl +../ui/pages/*.tmpl +../i18n.py diff --git a/src/wok/plugins/sample/po/en_US.po b/src/wok/plugins/sample/po/en_US.po index 40b23e9..c035905 100644 --- a/src/wok/plugins/sample/po/en_US.po +++ b/src/wok/plugins/sample/po/en_US.po @@ -17,5 +17,49 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" -msgid "SampleTab" -msgstr "SampleTab" +msgid "SampleTab1" +msgstr "Sample Tab 1" + +msgid "SampleTab2" +msgstr "Sample Tab 2" + +#, python-format +msgid "Unkown parameter specified %(value)s" +msgstr "" + +#, python-format +msgid "The specified value %(value)s is not a positive number" +msgstr "" + +#, python-format +msgid "Circle %(name)s does not exist" +msgstr "" + +msgid "Specify name and radius to create a Circle" +msgstr "" + +msgid "Circle name must be a string" +msgstr "" + +msgid "Circle radius must be a positive number" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s already exists" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s does not exist" +msgstr "" + +msgid "Specify name, length and width to create a Rectangle" +msgstr "" + +msgid "Rectangle name must be a string" +msgstr "" + +msgid "Rectangle length must be a positive number" +msgstr "" + +msgid "Rectangle width must be a positive number" +msgstr "" diff --git a/src/wok/plugins/sample/po/gen-pot b/src/wok/plugins/sample/po/gen-pot deleted file mode 100755 index e16bf25..0000000 --- a/src/wok/plugins/sample/po/gen-pot +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# Project Wok -# -# Copyright IBM Corp, 2015-2016 -# -# Code derived from Project Kimchi -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software - -for src in $@; do - if [ ${src: -3} == ".py" ]; then - cat $src - else - cat $src | cheetah compile - - fi -done | xgettext --no-location -o sample.pot -L Python - diff --git a/src/wok/plugins/sample/po/pt_BR.po b/src/wok/plugins/sample/po/pt_BR.po index 715fdb3..b91fd5b 100644 --- a/src/wok/plugins/sample/po/pt_BR.po +++ b/src/wok/plugins/sample/po/pt_BR.po @@ -20,5 +20,49 @@ msgstr "" "X-Poedit-Language: Portuguese\n" "X-Poedit-SourceCharset: utf-8\n" -msgid "SampleTab" -msgstr "Tab de exemplo" +msgid "SampleTab1" +msgstr "Aba de Exemplo 1" + +msgid "SampleTab2" +msgstr "Aba de Exemplo 2" + +#, python-format +msgid "Unkown parameter specified %(value)s" +msgstr "" + +#, python-format +msgid "The specified value %(value)s is not a positive number" +msgstr "" + +#, python-format +msgid "Circle %(name)s does not exist" +msgstr "" + +msgid "Specify name and radius to create a Circle" +msgstr "" + +msgid "Circle name must be a string" +msgstr "" + +msgid "Circle radius must be a positive number" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s already exists" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s does not exist" +msgstr "" + +msgid "Specify name, length and width to create a Rectangle" +msgstr "" + +msgid "Rectangle name must be a string" +msgstr "" + +msgid "Rectangle length must be a positive number" +msgstr "" + +msgid "Rectangle width must be a positive number" +msgstr "" diff --git a/src/wok/plugins/sample/po/sample.pot b/src/wok/plugins/sample/po/sample.pot index 661fd74..701939f 100644 --- a/src/wok/plugins/sample/po/sample.pot +++ b/src/wok/plugins/sample/po/sample.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-06-24 09:46-0300\n" +"POT-Creation-Date: 2016-10-31 16:22-0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,5 +17,49 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -msgid "SampleTab" +msgid "SampleTab1" +msgstr "" + +msgid "SampleTab2" +msgstr "" + +#, python-format +msgid "Unkown parameter specified %(value)s" +msgstr "" + +#, python-format +msgid "The specified value %(value)s is not a positive number" +msgstr "" + +#, python-format +msgid "Circle %(name)s does not exist" +msgstr "" + +msgid "Specify name and radius to create a Circle" +msgstr "" + +msgid "Circle name must be a string" +msgstr "" + +msgid "Circle radius must be a positive number" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s already exists" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s does not exist" +msgstr "" + +msgid "Specify name, length and width to create a Rectangle" +msgstr "" + +msgid "Rectangle name must be a string" +msgstr "" + +msgid "Rectangle length must be a positive number" +msgstr "" + +msgid "Rectangle width must be a positive number" msgstr "" diff --git a/src/wok/plugins/sample/po/update-po b/src/wok/plugins/sample/po/update-po new file mode 100755 index 0000000..b9c464f --- /dev/null +++ b/src/wok/plugins/sample/po/update-po @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Project Wok +# +# Copyright IBM Corp, 2016 +# +# Code derived from Project Kimchi +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software + +for src in `cat POTFILES.in`; do + if [ ${src: -3} == ".py" ]; then + cat $src + else + cat $src | cheetah compile - + fi +done | xgettext --no-location -o sample.pot -L Python - + +for lingua in `cat LINGUAS`; do + msgmerge --update --no-fuzzy-matching --backup=off $lingua.po sample.pot + msgfmt -c --statistics --verbose -o $lingua.gmo $lingua.po +done + diff --git a/src/wok/plugins/sample/po/zh_CN.po b/src/wok/plugins/sample/po/zh_CN.po index ddf2d83..6f16bfb 100644 --- a/src/wok/plugins/sample/po/zh_CN.po +++ b/src/wok/plugins/sample/po/zh_CN.po @@ -20,5 +20,49 @@ msgstr "" "X-Poedit-Language: Chinese\n" "X-Poedit-SourceCharset: utf-8\n" -msgid "SampleTab" -msgstr "示例标签" +msgid "SampleTab1" +msgstr "示例标签 1" + +msgid "SampleTab2" +msgstr "示例标签 2" + +#, python-format +msgid "Unkown parameter specified %(value)s" +msgstr "" + +#, python-format +msgid "The specified value %(value)s is not a positive number" +msgstr "" + +#, python-format +msgid "Circle %(name)s does not exist" +msgstr "" + +msgid "Specify name and radius to create a Circle" +msgstr "" + +msgid "Circle name must be a string" +msgstr "" + +msgid "Circle radius must be a positive number" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s already exists" +msgstr "" + +#, python-format +msgid "Rectangle %(name)s does not exist" +msgstr "" + +msgid "Specify name, length and width to create a Rectangle" +msgstr "" + +msgid "Rectangle name must be a string" +msgstr "" + +msgid "Rectangle length must be a positive number" +msgstr "" + +msgid "Rectangle width must be a positive number" +msgstr "" diff --git a/src/wok/plugins/sample/root.py b/src/wok/plugins/sample/root.py new file mode 100644 index 0000000..ae974ac --- /dev/null +++ b/src/wok/plugins/sample/root.py @@ -0,0 +1,171 @@ +# +# Project Wok +# +# Copyright IBM Corp, 2016 +# +# Code derived from Project Kimchi +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +import json +import os + +from wok.config import CACHEEXPIRES, PluginConfig, PluginPaths +from wok.control.base import Collection, Resource +from wok.control.utils import UrlSubNode +from wok.plugins.sample.i18n import messages +from wok.plugins.sample.model import Model +from wok.root import WokRoot + + +samplePaths = PluginPaths('sample') + + +""" +The main class must be the plugin name starting with upper case. In this case, +Sample. The Sample class is a WokRoot instance with plugin specific details. + +Each class attribute which is a Resource or a Collection will be translated as +a new REST API. So self.config to /config API, self.description to +/description API and so on. + +self.paths represents the plugin paths. Usually it is PluginPath(<plugin-name>) + +self.domain is the gettext domain name. Usually it is the plugin name. + +self.messages is a list of all i18n messages used on backend side. +The messages used on UI are placed at ui/pages/i18n.json.tmpl + +self.api_schema is the JSON Schema document necessary to validate each REST API +created by the plugin. +""" +class Sample(WokRoot): + def __init__(self, wok_options): + self.model = Model() + super(Sample, self).__init__(self.model) + self.config = Config(self.model) + self.description = Description(self.model) + self.rectangles = Rectangles(self.model) + self.circles = Circles(self.model) + + self.paths = samplePaths + self.domain = 'sample' + self.messages = messages + self.api_schema = json.load(open(os.path.join(os.path.dirname( + os.path.abspath(__file__)), 'API.json'))) + + + """ + Re-write get_custom_conf() to expose static directories and files. + It is for those APIs which do not rely on any backend logic to exist. + """ + def get_custom_conf(self): + return SampleConfig() + + +""" +Static directories and files configuration for Sample plugin. + +The configuration is a dictionary supported by cherrypy. +""" +class SampleConfig(PluginConfig): + def __init__(self): + super(SampleConfig, self).__init__('sample') + + custom_config ={ + '/js': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': os.path.join(samplePaths.ui_dir, 'js'), + 'tools.wokauth.on': False, + 'tools.nocache.on': False, + 'tools.expires.on': True, + 'tools.expires.secs': CACHEEXPIRES + }, + '/images': { + 'tools.wokauth.on': False, + 'tools.nocache.on': False, + 'tools.staticdir.dir': os.path.join(samplePaths.ui_dir, + 'images'), + 'tools.staticdir.on': True + }, + '/help': {'tools.nocache.on': True, + 'tools.staticdir.dir': os.path.join(samplePaths.ui_dir, + 'pages/help'), + 'tools.staticdir.on': True}, + } + + self.update(custom_config) + + + +""" +All the classes below correspond to a REST API. +""" +class Config(Resource): + def __init__(self, model): + super(Config, self).__init__(model) + + @property + def data(self): + return self.info + + + +class Description(Resource): + def __init__(self, model): + super(Description, self).__init__(model) + + @property + def data(self): + return {'name': 'sample', 'version': '2.3.0'} + + +@UrlSubNode('circles', True) +class Circles(Collection): + def __init__(self, model): + super(Circles, self).__init__(model) + self.resource = Circle + self.admin_methods = ['POST', 'PUT'] + + +@UrlSubNode('rectangles', True) +class Rectangles(Collection): + def __init__(self, model): + super(Rectangles, self).__init__(model) + self.resource = Rectangle + self.admin_methods = ['POST', 'PUT'] + + +class Circle(Resource): + def __init__(self, model, ident): + super(Circle, self).__init__(model, ident) + self.update_params = ['radius'] + + @property + def data(self): + ret = {'name': self.ident} + ret.update(self.info) + return ret + + +class Rectangle(Resource): + def __init__(self, model, ident): + super(Rectangle, self).__init__(model, ident) + self.update_params = ['length', 'width'] + + @property + def data(self): + self.info.update({'name': self.ident}) + return self.info diff --git a/src/wok/plugins/sample/sample.conf b/src/wok/plugins/sample/sample.conf new file mode 100644 index 0000000..fcbefe9 --- /dev/null +++ b/src/wok/plugins/sample/sample.conf @@ -0,0 +1,3 @@ +[wok] +# Enable Sample plugin on Wok server (values: True|False) +enable = False diff --git a/src/wok/plugins/sample/sample.conf.in b/src/wok/plugins/sample/sample.conf.in deleted file mode 100644 index 75ea5b0..0000000 --- a/src/wok/plugins/sample/sample.conf.in +++ /dev/null @@ -1,27 +0,0 @@ -[wok] -enable = False -plugin_class = "Drawings" -uri = "/plugins/sample" - -[/] -tools.nocache.on = True -tools.trailing_slash.on = False -tools.sessions.on = True -tools.sessions.name = 'wok' -tools.sessions.httponly = True -tools.sessions.locking = 'explicit' -tools.sessions.storage_type = 'ram' - -[/description] -tools.wokauth.on = True - -[/rectangles] -tools.wokauth.on = True - -[/circles] -tools.wokauth.on = True - -[/help] -tools.staticdir.on = True -tools.nocache.on = True -tools.staticdir.dir = wok.config.PluginPaths('sample').ui_dir + '/pages/help' diff --git a/src/wok/plugins/sample/ui/config/tab-ext.xml b/src/wok/plugins/sample/ui/config/tab-ext.xml index aff0d14..e3d2336 100644 --- a/src/wok/plugins/sample/ui/config/tab-ext.xml +++ b/src/wok/plugins/sample/ui/config/tab-ext.xml @@ -1,17 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> <tabs-ext> + <functionality colorTab1="#B404AE" colorTab2="#DF01D7">Sample</functionality> <tab> <access role="admin" mode="admin"/> <access role="user" mode="none"/> - - <title>SampleTab 1</title> - <path>plugins/sample/sample-tab1.html</path> + <title>SampleTab1</title> + <path>plugins/sample/tabs/sample-tab1.html</path> + <order>85</order> </tab> <tab> <access role="admin" mode="admin"/> <access role="user" mode="none"/> - - <title>SampleTab 2</title> - <path>plugins/sample/sample-tab2.html</path> + <title>SampleTab2</title> + <path>plugins/sample/tabs/sample-tab2.html</path> + <order>90</order> </tab> </tabs-ext> diff --git a/src/wok/plugins/sample/ui/images/sample.svg b/src/wok/plugins/sample/ui/images/sample.svg new file mode 100644 index 0000000..44c516b --- /dev/null +++ b/src/wok/plugins/sample/ui/images/sample.svg @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg version="1.1" id="Wok" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve"> + <title + id="title">Wok</title> + <metadata + id="license"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Wok</dc:title> + <cc:license rdf:resource="http://www.apache.org/licenses/LICENSE-2.0" /> + <dc:date>2016</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>IBM, Corp.</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>IBM, Corp.</dc:title> + </cc:Agent> + </dc:rights> + <dc:publisher> + <cc:Agent> + <dc:title>IBM, Corp.</dc:title> + </cc:Agent> + </dc:publisher> + <dc:contributor> + <cc:Agent> + <dc:title>https://github.com/kimchi-project/wok</dc:title> + </cc:Agent> + </dc:contributor> + <dc:description>Wok is a cherrypy-based web framework with HTML5 support originated from Kimchi. It can be extended by plugins which expose functionality through REST APIs.</dc:description> + </cc:Work> + </rdf:RDF> + </metadata> +<style type="text/css"> + .st0{fill:#F73434;} +</style> +<g> + <path class="st0" d="M439.2,176.3c0.4-5.1,0.7-10.3,0.7-15.6h-6.3h-16.3H82.7h-7.2H60.1c0,5.3,0.3,10.5,0.7,15.6H24.4v31.4h41.9 + c20.9,77.5,92.9,131.6,183.7,131.6s162.9-54,183.7-131.6h41.9v-31.4H439.2z"/> +</g> +</svg> \ No newline at end of file diff --git a/src/wok/plugins/sample/ui/pages/i18n.json.tmpl b/src/wok/plugins/sample/ui/pages/i18n.json.tmpl index 124ac30..cab58ee 100644 --- a/src/wok/plugins/sample/ui/pages/i18n.json.tmpl +++ b/src/wok/plugins/sample/ui/pages/i18n.json.tmpl @@ -24,5 +24,6 @@ #silent _ = t.gettext #silent _t = t.gettext { - "SampleTab": "$_("SampleTab")" + "SampleTab1": "$_("SampleTab1")", + "SampleTab2": "$_("SampleTab2")" } diff --git a/src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl b/src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl deleted file mode 100644 index 2777848..0000000 --- a/src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl +++ /dev/null @@ -1,32 +0,0 @@ -#* - * Project Wok - * - * Copyright IBM Corp, 2015-2016 - * - * Code derived from Project Kimchi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *# -#unicode UTF-8 -<!DOCTYPE html> -<html> -<script type="text/javascript" src="plugins/sample/js/util.js"></script> -<body> - <div id="samplebody"/> -</body> -<script> - sample.description(function(r){ - \$("#samplebody").html("name: " + r.name + " version: " + r.version); - }); -</script> -</html> diff --git a/src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl b/src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl deleted file mode 100644 index 2777848..0000000 --- a/src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl +++ /dev/null @@ -1,32 +0,0 @@ -#* - * Project Wok - * - * Copyright IBM Corp, 2015-2016 - * - * Code derived from Project Kimchi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *# -#unicode UTF-8 -<!DOCTYPE html> -<html> -<script type="text/javascript" src="plugins/sample/js/util.js"></script> -<body> - <div id="samplebody"/> -</body> -<script> - sample.description(function(r){ - \$("#samplebody").html("name: " + r.name + " version: " + r.version); - }); -</script> -</html> diff --git a/src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl b/src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl new file mode 100644 index 0000000..9a0d678 --- /dev/null +++ b/src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl @@ -0,0 +1,39 @@ +#* + * Project Wok + * + * Copyright IBM Corp, 2016 + * + * Code derived from Project Kimchi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *# + +#unicode UTF-8 + +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" href="plugins/sample/css/sample.css"> + <script type="text/javascript" src="plugins/sample/js/util.js"></script> +</head> +<body> + <div id="sample-root-container"> + <div id="samplebody"/> +</div> +</body> +<script> + sample.description(function(r){ + \$("#samplebody").html("name: " + r.name + " version: " + r.version); + }); +</script> +</html> diff --git a/src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl b/src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl new file mode 100644 index 0000000..9a0d678 --- /dev/null +++ b/src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl @@ -0,0 +1,39 @@ +#* + * Project Wok + * + * Copyright IBM Corp, 2016 + * + * Code derived from Project Kimchi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *# + +#unicode UTF-8 + +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" href="plugins/sample/css/sample.css"> + <script type="text/javascript" src="plugins/sample/js/util.js"></script> +</head> +<body> + <div id="sample-root-container"> + <div id="samplebody"/> +</div> +</body> +<script> + sample.description(function(r){ + \$("#samplebody").html("name: " + r.name + " version: " + r.version); + }); +</script> +</html> -- 2.7.4

Reviewed-By: Lucio Correia <luciojhc@linux.vnet.ibm.com> On 31/10/2016 16:56, Aline Manera wrote:
Aline Manera (3): Bug fix #7: Do not include Sample plugin files on Wok build Remove unnecessary directories from Sample plugin structure Bug fix #177: Fix Sample plugin according to latest changes on Wok
.gitignore | 1 - IBM-license-blacklist | 3 - configure.ac | 23 -- src/wok/plugins/Makefile.am | 2 - src/wok/plugins/sample/Makefile.am | 31 -- src/wok/plugins/sample/__init__.py | 80 +---- src/wok/plugins/sample/config.status | 1 - src/wok/plugins/sample/model.py | 37 +- src/wok/plugins/sample/po/Makefile.in.in | 391 --------------------- src/wok/plugins/sample/po/Makevars | 41 --- src/wok/plugins/sample/po/POTFILES.in | 4 +- src/wok/plugins/sample/po/en_US.po | 48 ++- src/wok/plugins/sample/po/gen-pot | 28 -- src/wok/plugins/sample/po/pt_BR.po | 48 ++- src/wok/plugins/sample/po/sample.pot | 48 ++- src/wok/plugins/sample/po/update-po | 34 ++ src/wok/plugins/sample/po/zh_CN.po | 48 ++- src/wok/plugins/sample/root.py | 171 +++++++++ src/wok/plugins/sample/sample.conf | 3 + src/wok/plugins/sample/sample.conf.in | 27 -- src/wok/plugins/sample/ui/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/tab-ext.xml | 13 +- src/wok/plugins/sample/ui/css/.gitignore | 0 src/wok/plugins/sample/ui/images/.gitignore | 0 src/wok/plugins/sample/ui/images/sample.svg | 45 +++ src/wok/plugins/sample/ui/js/Makefile.am | 22 -- src/wok/plugins/sample/ui/libs/.gitignore | 0 src/wok/plugins/sample/ui/pages/Makefile.am | 22 -- src/wok/plugins/sample/ui/pages/i18n.json.tmpl | 3 +- .../plugins/sample/ui/pages/sample-tab1.html.tmpl | 32 -- .../plugins/sample/ui/pages/sample-tab2.html.tmpl | 32 -- .../sample/ui/pages/tabs/sample-tab1.html.tmpl | 39 ++ .../sample/ui/pages/tabs/sample-tab2.html.tmpl | 39 ++ 34 files changed, 553 insertions(+), 807 deletions(-) delete mode 100644 src/wok/plugins/sample/Makefile.am delete mode 120000 src/wok/plugins/sample/config.status delete mode 100644 src/wok/plugins/sample/po/Makefile.in.in delete mode 100644 src/wok/plugins/sample/po/Makevars delete mode 100755 src/wok/plugins/sample/po/gen-pot create mode 100755 src/wok/plugins/sample/po/update-po create mode 100644 src/wok/plugins/sample/root.py create mode 100644 src/wok/plugins/sample/sample.conf delete mode 100644 src/wok/plugins/sample/sample.conf.in delete mode 100644 src/wok/plugins/sample/ui/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/config/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/css/.gitignore delete mode 100644 src/wok/plugins/sample/ui/images/.gitignore create mode 100644 src/wok/plugins/sample/ui/images/sample.svg delete mode 100644 src/wok/plugins/sample/ui/js/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/libs/.gitignore delete mode 100644 src/wok/plugins/sample/ui/pages/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl
-- Lucio Correia Software Engineer IBM LTC Brazil

Forwarding again... -------- Forwarded Message -------- Subject: Re: [Kimchi-devel] [PATCH] [Wok 0/3] Fix Sample plugin Date: Tue, 1 Nov 2016 09:28:49 -0200 From: Lucio Correia <luciojhc@linux.vnet.ibm.com> Reply-To: luciojhc@linux.vnet.ibm.com Organization: IBM To: kimchi-devel@ovirt.org Reviewed-By: Lucio Correia <luciojhc@linux.vnet.ibm.com> On 31/10/2016 16:56, Aline Manera wrote:
Aline Manera (3): Bug fix #7: Do not include Sample plugin files on Wok build Remove unnecessary directories from Sample plugin structure Bug fix #177: Fix Sample plugin according to latest changes on Wok
.gitignore | 1 - IBM-license-blacklist | 3 - configure.ac | 23 -- src/wok/plugins/Makefile.am | 2 - src/wok/plugins/sample/Makefile.am | 31 -- src/wok/plugins/sample/__init__.py | 80 +---- src/wok/plugins/sample/config.status | 1 - src/wok/plugins/sample/model.py | 37 +- src/wok/plugins/sample/po/Makefile.in.in | 391 --------------------- src/wok/plugins/sample/po/Makevars | 41 --- src/wok/plugins/sample/po/POTFILES.in | 4 +- src/wok/plugins/sample/po/en_US.po | 48 ++- src/wok/plugins/sample/po/gen-pot | 28 -- src/wok/plugins/sample/po/pt_BR.po | 48 ++- src/wok/plugins/sample/po/sample.pot | 48 ++- src/wok/plugins/sample/po/update-po | 34 ++ src/wok/plugins/sample/po/zh_CN.po | 48 ++- src/wok/plugins/sample/root.py | 171 +++++++++ src/wok/plugins/sample/sample.conf | 3 + src/wok/plugins/sample/sample.conf.in | 27 -- src/wok/plugins/sample/ui/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/Makefile.am | 22 -- src/wok/plugins/sample/ui/config/tab-ext.xml | 13 +- src/wok/plugins/sample/ui/css/.gitignore | 0 src/wok/plugins/sample/ui/images/.gitignore | 0 src/wok/plugins/sample/ui/images/sample.svg | 45 +++ src/wok/plugins/sample/ui/js/Makefile.am | 22 -- src/wok/plugins/sample/ui/libs/.gitignore | 0 src/wok/plugins/sample/ui/pages/Makefile.am | 22 -- src/wok/plugins/sample/ui/pages/i18n.json.tmpl | 3 +- .../plugins/sample/ui/pages/sample-tab1.html.tmpl | 32 -- .../plugins/sample/ui/pages/sample-tab2.html.tmpl | 32 -- .../sample/ui/pages/tabs/sample-tab1.html.tmpl | 39 ++ .../sample/ui/pages/tabs/sample-tab2.html.tmpl | 39 ++ 34 files changed, 553 insertions(+), 807 deletions(-) delete mode 100644 src/wok/plugins/sample/Makefile.am delete mode 120000 src/wok/plugins/sample/config.status delete mode 100644 src/wok/plugins/sample/po/Makefile.in.in delete mode 100644 src/wok/plugins/sample/po/Makevars delete mode 100755 src/wok/plugins/sample/po/gen-pot create mode 100755 src/wok/plugins/sample/po/update-po create mode 100644 src/wok/plugins/sample/root.py create mode 100644 src/wok/plugins/sample/sample.conf delete mode 100644 src/wok/plugins/sample/sample.conf.in delete mode 100644 src/wok/plugins/sample/ui/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/config/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/css/.gitignore delete mode 100644 src/wok/plugins/sample/ui/images/.gitignore create mode 100644 src/wok/plugins/sample/ui/images/sample.svg delete mode 100644 src/wok/plugins/sample/ui/js/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/libs/.gitignore delete mode 100644 src/wok/plugins/sample/ui/pages/Makefile.am delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl
-- Lucio Correia Software Engineer IBM LTC Brazil -- Lucio Correia Software Engineer IBM LTC Brazil
participants (2)
-
Aline Manera
-
Lucio Correia