From ed541277f5e71afb27be53a588543d1e80ec3873 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 21 Oct 2007 19:32:52 +0200 Subject: Grab upstream pages from version 2.10. --- ikiwiki.setup | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 ikiwiki.setup diff --git a/ikiwiki.setup b/ikiwiki.setup new file mode 100644 index 0000000..3a0658e --- /dev/null +++ b/ikiwiki.setup @@ -0,0 +1,147 @@ +#!/usr/bin/perl +# Configuration file for ikiwiki. +# Passing this to ikiwiki --setup will make ikiwiki generate wrappers and +# build the wiki. +# +# Remember to re-run ikiwiki --setup any time you edit this file. + +use IkiWiki::Setup::Standard { + wikiname => "MyWiki", + #adminuser => ["yourname", ], + adminemail => 'me@example.org', + + # Be sure to customise these.. + srcdir => "/path/to/source", + destdir => "/var/www/wiki", + + url => "http://example.org/wiki", + cgiurl => "http://example.org/ikiwiki.cgi", + #templatedir => "/usr/share/ikiwiki/templates", + #underlaydir => "/usr/share/ikiwiki/basewiki", + + # Subversion stuff. + #rcs => "svn", + #historyurl => "http://svn.example.org/trunk/[[file]]", + #diffurl => "http://svn.example.org/trunk/[[file]]?root=wiki&r1=[[r1]]&r2=[[r2]]", + #svnrepo => "/svn/wiki", + #svnpath => "trunk", + + # Git stuff. + #rcs => "git", + #historyurl => "http://git.example.org/gitweb.cgi?p=wiki.git;a=history;f=[[file]]", + #diffurl => "http://git.example.org/gitweb.cgi?p=wiki.git;a=blobdiff;h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_parent]];f=[[file]]", + #gitorigin_branch => "origin", + #gitmaster_branch => "master", + + # Tla stuff. + #rcs => "tla" + #historyurl => ??, + #diffurl => ??, + + # Mercurial stuff. + #rcs => "mercurial", + #historyurl => "http://localhost:8000/", # hg serve'd local repository + #diffurl => "http://localhost:8000/?fd=[[r2]];file=[[file]]", + + # Monotone stuff + #rcs => "monotone", + #mtnkey => "web\@machine.company.com", + # Set if you want the wiki to sync on update and commit. + #mtnsync => 0, + # The path to your workspace (defaults to the srcdir itself) + # e.g. use if your srcdir is a subdirectory of the workspace. + #mtnrootdir => "path/to/root/of/workspace", + # This is a monotone lua hook file used by ikiwiki for + # inserting conflict markers. By default it will use + # mtnrootdir/_MTN/mergerc. This hook will be populated with + # default code the first time you use ikiwiki. You can + # change it to alter how conflict markers are inserted. + #mtnmergerc => "path/to/mergerc", + + wrappers => [ + #{ + # # The cgi wrapper. + # cgi => 1, + # wrapper => "/var/www/wiki/ikiwiki.cgi", + # wrappermode => "06755", + #}, + #{ + # # The svn post-commit wrapper. + # # Note that this will overwrite any existing + # # post-commit hook script, which may not be + # # what you want. + # wrapper => "/svn/wikirepo/hooks/post-commit", + # wrappermode => "04755", + # # Enable mail notifications of commits. + # notify => 1, + # # Log to syslog since svn post-commit hooks + # # hide output and errors. + # syslog => 1, + #}, + #{ + # # The git post-update wrapper. + # # Note that this will overwrite any existing + # # post-update hook script, which may not be + # # what you want. + # wrapper => "/git/wiki.git/hooks/post-update", + # wrappermode => "04755", + # # Enable mail notifications of commits. + # notify => 1, + #}, + ], + + # Generate rss feeds for blogs? + rss => 1, + # Generate atom feeds for blogs? + atom => 1, + # Urls to ping with XML-RPC when rss feeds are updated + #pingurl => [qw{http://rpc.technorati.com/rpc/ping}], + # Include discussion links on all pages? + discussion => 1, + # To exclude files matching a regexp from processing. This adds to + # the default exclude list. + #exclude => qr/*\.wav/, + # To change the extension used for generated html files. + #htmlext => 'htm', + # Time format (for strftime) + #timeformat => '%c', + # Locale to use. Must be a UTF-8 locale. + #locale => 'en_US.UTF-8', + # Only send cookies over SSL connections. + #sslcookie => 1, + # Logging settings: + #verbose => 1, + syslog => 0, + # To link to user pages in a subdirectory of the wiki. + #userdir => "users", + # To create output files named page.html rather than page/index.html. + #usedirs => 0, + # Simple spam prevention: require an account-creation password. + #account_creation_password => "example", + + # To add plugins, list them here. + #add_plugins => [qw{goodstuff search wikitext camelcase + # htmltidy fortune sidebar map rst anonok}], + # If you want to disable any of the default plugins, list them here. + #disable_plugins => [qw{inline htmlscrubber passwordauth openid}], + # To add a directory to the perl searh path, use this. + #libdir => "/home/me/.ikiwiki/", + + # For use with the tag plugin, make all tags be located under a + # base page. + #tagbase => "tag", + + # For use with the search plugin if your estseek.cgi is located + # somewhere else. + #estseek => "/usr/lib/estraier/estseek.cgi", + + # For use with the openid plugin, to give an url to a page users + # can use to signup for an OpenID. + #openidsignup => "http://myopenid.com/", + + # For use with the mirrorlist plugin, a list of mirrors. + #mirrorlist => { + # mirror1 => "http://hostname1", + # mirror2 => "http://hostname2/mirror", + #}, +} -- cgit v1.2.3 From e972aef95fe67ad2d6ed5ed7a53f89434b505148 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 21 Oct 2007 22:45:39 +0200 Subject: Add makefile with rules to clone and wipe GIT repositories of upstream and localized underlays. Ignore GIT repositories. --- .gitignore | 6 ++++++ Makefile | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..658803e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/basewiki +/basewiki_l10n +/smiley +/smiley_l10n +/templates +/templates_l10n diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..09a99c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +sources = ikiwiki + +origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git +underlays_ikiwiki = basewiki smiley templates +master_ikiwiki = master$(locale:%=-$(locale)) + +locales = danish + +underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) +underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) + +source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) +origin = $(origin_$(source_of_underlay)) +master = $(master_$(source_of_underlay)) + +all: $(underlays) + +$(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) +$(underlays): underlay=$(@:%_l10n/$(locale)=%) +$(underlays): + mkdir -p $@ + cd $@ && git init + cd $@ && git remote add -f -t $(master) -m $(master) origin $(origin) + cd $@ && git merge origin + +# WARNING: this may wipe unrelated files too! +ultraclean: + rm -rf $(underlays) + rm -rf $(dir $(underlays_l10n)) -- cgit v1.2.3 From 320b20776bcddffc62ee3d01114826c2d43da5dc Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 21 Oct 2007 23:35:18 +0200 Subject: Switch to 2-letter locale code. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 09a99c4..c8d525e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git underlays_ikiwiki = basewiki smiley templates master_ikiwiki = master$(locale:%=-$(locale)) -locales = danish +locales = da underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) -- cgit v1.2.3 From 55832f6d3d7134926b35cc7ab3e5ef56e8c00a44 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 22 Oct 2007 02:13:51 +0200 Subject: Localize per soure (sources may contain different l10n). --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c8d525e..cc0e7c2 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,9 @@ sources = ikiwiki origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git underlays_ikiwiki = basewiki smiley templates master_ikiwiki = master$(locale:%=-$(locale)) +locales_ikiwiki = da -locales = da - -underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) +underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) -- cgit v1.2.3 From 003ba4a9b3234d980ebe2bf443e0435f59bf3c27 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 23 Oct 2007 16:52:02 +0200 Subject: Add brief documentation. --- README | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..92820c0 --- /dev/null +++ b/README @@ -0,0 +1,33 @@ +Ikiwiki w/ translations +======================= + +Ikiwiki[1] is a perl-based wiki compiler. + +This is routines to manage translatable parts of Ikiwiki and translations into +the following locales: + + * danish (da) by Jonas Smedegaard + + +Installation +------------ + +To pull in all translatable and translated parts, do this: + + make + +To remove all translatable and translated parts, and anything else below those +directories without warning, do this: + + make ultraclean + +Source +------ + +These routines are available at http://source.jones.dk/ as a GIT archive - like +this: + + git clone http://source.jones.dk/ikiwiki.git + + +[1] http://ikiwiki.info/ -- cgit v1.2.3 From d6cddc84f5e916c468bf54f9519b2617b6676afc Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 23 Oct 2007 18:28:57 +0200 Subject: More documentation, --- README | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README b/README index 92820c0..f94aedc 100644 --- a/README +++ b/README @@ -24,10 +24,30 @@ directories without warning, do this: Source ------ -These routines are available at http://source.jones.dk/ as a GIT archive - like -this: +These routines are available at http://source.jones.dk/ as a GIT repository. +Pull it like this: git clone http://source.jones.dk/ikiwiki.git +To publish your own forked repository through web, you need to create a special +public repository that you "push" your changes into from your private working +repository (the --all option is rewuired only initially) - like this: + + GIT_DIR=public_dir/repository_name.git git --bare init --shared + chmod +x public_dir/repository_name.git/hooks/post-update + git push --all + +To resyncronize an older fork of the repository, re-applying local changes on +top of the newer upstream GIT source, do like this from within your local +forked repository: + + git remote add ikiwiki http://source.jones.dk/ikiwiki.git + git fetch ikiwiki + git rebase ikiwiki/master + + +---- + +References: [1] http://ikiwiki.info/ -- cgit v1.2.3 From ae68052e87dad54b16a9878f98dd9a2207bb9cb1 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 23 Oct 2007 18:51:54 +0200 Subject: More details on creating public repository. --- README | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README b/README index f94aedc..0ae879c 100644 --- a/README +++ b/README @@ -29,12 +29,18 @@ Pull it like this: git clone http://source.jones.dk/ikiwiki.git -To publish your own forked repository through web, you need to create a special -public repository that you "push" your changes into from your private working -repository (the --all option is rewuired only initially) - like this: +To publish your own forked repository through web, you first need to create a +special public repository that you "push" your changes into from your private +working repository - like this: GIT_DIR=public_dir/repository_name.git git --bare init --shared chmod +x public_dir/repository_name.git/hooks/post-update + +To actually use your newly created public repository as above, you first need +to populate it with your current working repository (the --all option is only +this once, not on subsequent pushes) - like this: + + git remote add origin git-reference-to-public-repository git push --all To resyncronize an older fork of the repository, re-applying local changes on -- cgit v1.2.3 From 90ac3ddb96fa6516388bc5f6f04a4acd228d28e0 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 28 Oct 2007 18:40:12 +0100 Subject: Forking development requires changing (not adding) the origin. --- README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 0ae879c..963cb1e 100644 --- a/README +++ b/README @@ -36,11 +36,11 @@ working repository - like this: GIT_DIR=public_dir/repository_name.git git --bare init --shared chmod +x public_dir/repository_name.git/hooks/post-update -To actually use your newly created public repository as above, you first need -to populate it with your current working repository (the --all option is only -this once, not on subsequent pushes) - like this: +To actually use your newly created public repository created above, you need to +populate it with your current working repository (the --all option is only this +once, not on subsequent pushes) - like this: - git remote add origin git-reference-to-public-repository + git config remote.origin.url git-reference-to-public-repository git push --all To resyncronize an older fork of the repository, re-applying local changes on -- cgit v1.2.3 From 3def5265510535afca772005158d07c829d36cd8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 1 Nov 2007 18:55:03 +0100 Subject: Add support for dummy content repositories. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc0e7c2..9775eb1 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ underlays_ikiwiki = basewiki smiley templates master_ikiwiki = master$(locale:%=-$(locale)) locales_ikiwiki = da +#dummies = content_dummy + underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) @@ -12,7 +14,7 @@ source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(u origin = $(origin_$(source_of_underlay)) master = $(master_$(source_of_underlay)) -all: $(underlays) +all: $(underlays) $(dummies) $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) $(underlays): underlay=$(@:%_l10n/$(locale)=%) @@ -22,7 +24,11 @@ $(underlays): cd $@ && git remote add -f -t $(master) -m $(master) origin $(origin) cd $@ && git merge origin +$(dummies): + mkdir -p $@ + # WARNING: this may wipe unrelated files too! ultraclean: rm -rf $(underlays) rm -rf $(dir $(underlays_l10n)) + rm -rf $(dummies) -- cgit v1.2.3 From 6fa3064fb5115e91cce64ab56c0b3b5c14b8b368 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 2 Nov 2007 12:56:43 +0100 Subject: Document overriding repository setting for write access. --- README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README b/README index 963cb1e..289b52d 100644 --- a/README +++ b/README @@ -16,6 +16,10 @@ To pull in all translatable and translated parts, do this: make +To pull in all parts with write access to the repository, do this: + + make origin_ikiwiki='login@example.com:path/to/repositories/ikiwiki_$(underlay).git' + To remove all translatable and translated parts, and anything else below those directories without warning, do this: -- cgit v1.2.3 From 0a47a506c73f56a003d478c6b27f147d2a2ecb31 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 2 Nov 2007 13:33:04 +0100 Subject: Extend Makefile to support updating repositories with subsequent bare make invocations. --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9775eb1..b2072eb 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,16 @@ all: $(underlays) $(dummies) $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) $(underlays): underlay=$(@:%_l10n/$(locale)=%) $(underlays): - mkdir -p $@ - cd $@ && git init - cd $@ && git remote add -f -t $(master) -m $(master) origin $(origin) - cd $@ && git merge origin + @mkdir -p $@ + @if [ -d "$@/.git" ]; then \ + cd $@ && \ + git pull; \ + else \ + cd $@ && \ + git init && \ + git remote add -f -t $(master) -m $(master) origin $(origin) && \ + git merge origin; \ + fi $(dummies): mkdir -p $@ @@ -32,3 +38,5 @@ ultraclean: rm -rf $(underlays) rm -rf $(dir $(underlays_l10n)) rm -rf $(dummies) + +.PHONY: $(underlays) -- cgit v1.2.3 From 46e6968649c73ea4c4118c8535bb4fc238ee9384 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 2 Nov 2007 13:42:45 +0100 Subject: Un-silence creating repository dir to hint which is being cloned/updated. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b2072eb..fe8796b 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ all: $(underlays) $(dummies) $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) $(underlays): underlay=$(@:%_l10n/$(locale)=%) $(underlays): - @mkdir -p $@ + mkdir -p $@ @if [ -d "$@/.git" ]; then \ cd $@ && \ git pull; \ -- cgit v1.2.3 From 505e184a4a08a935f1f2bfb0bb9e7db3cd8b1ff8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 2 Nov 2007 14:26:54 +0100 Subject: Replace unneeded and problematic git rebase with git pull (now that I have figured out how to pull from third party). --- README | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README b/README index 289b52d..5280f86 100644 --- a/README +++ b/README @@ -47,13 +47,11 @@ once, not on subsequent pushes) - like this: git config remote.origin.url git-reference-to-public-repository git push --all -To resyncronize an older fork of the repository, re-applying local changes on -top of the newer upstream GIT source, do like this from within your local -forked repository: +To resyncronize an older fork of the repository with newer upstream changes, do +like this (skip first command on subsequent updates): git remote add ikiwiki http://source.jones.dk/ikiwiki.git - git fetch ikiwiki - git rebase ikiwiki/master + git pull ikiwiki master ---- -- cgit v1.2.3 From fbb2c87f5efe3284056852c2014f9270f2b29588 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 2 Nov 2007 14:58:52 +0100 Subject: Add skeleton install target to Makefile. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index fe8796b..1021ab3 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,10 @@ $(underlays): $(dummies): mkdir -p $@ +install: + $(error FIXME: you need to adjust ikiwiki.setup first!) +# ikiwiki --setup ikiwiki.setup --rebuild + # WARNING: this may wipe unrelated files too! ultraclean: rm -rf $(underlays) -- cgit v1.2.3 From e175511e4792242de9346a34af5379f404a13236 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 2 Nov 2007 18:06:36 +0100 Subject: Add to README a separate section about installation, and rename the old as customization. --- README | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README b/README index 5280f86..43dffa1 100644 --- a/README +++ b/README @@ -9,6 +9,15 @@ the following locales: * danish (da) by Jonas Smedegaard +Getting the source +------------------ + +This README file and related scripts are available at http://source.jones.dk/ +as a GIT repository. Pull it like this: + + git clone http://source.jones.dk/ikiwiki.git + + Installation ------------ @@ -25,13 +34,9 @@ directories without warning, do this: make ultraclean -Source ------- - -These routines are available at http://source.jones.dk/ as a GIT repository. -Pull it like this: - git clone http://source.jones.dk/ikiwiki.git +Customizing +----------- To publish your own forked repository through web, you first need to create a special public repository that you "push" your changes into from your private -- cgit v1.2.3 From 179cb125f2434b62ba7718a212d8213c013def34 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 3 Nov 2007 15:27:10 +0100 Subject: Add TODO about l10n directory structure problems with smiley plugin. --- TODO | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 TODO diff --git a/TODO b/TODO new file mode 100644 index 0000000..0ba1699 --- /dev/null +++ b/TODO @@ -0,0 +1,11 @@ +Stuff that ought to be changed +============================== + +Restructure l10n directories +---------------------------- + +Current l10n directory structure was made to mimic that of the 3rd party lang +plugin. + +Some plugins, notably the smiley plugin, however, expect to find its add-on +underlay beside the core underlay directory, which breaks currently. -- cgit v1.2.3 From af327904f4fe1a96f03f703a6169d00433f58851 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 4 Nov 2007 14:44:19 +0100 Subject: Add GIT hint for pushing, in case of write access to cloned repositories. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1021ab3..3119588 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,8 @@ $(underlays): cd $@ && \ git init && \ git remote add -f -t $(master) -m $(master) origin $(origin) && \ - git merge origin; \ + git merge origin && \ + git config remote.origin.push +refs/heads/master:refs/heads/$(master); \ fi $(dummies): -- cgit v1.2.3 From 814d907e2eaf50bcaa8927814fffa05f09913db9 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 4 Nov 2007 17:58:10 +0100 Subject: Add make rule to generate pot files. --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3119588..d4c574a 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,11 @@ locales_ikiwiki = da underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) +# FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) +#potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source)))) +potfiles = $(filter-out templates,$(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source))))) +pofiles = $(foreach locale, $(locales_$(source)), $(patsubst %.pot/%.$(locale).po,$(locale))) + source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) origin = $(origin_$(source_of_underlay)) master = $(master_$(source_of_underlay)) @@ -31,6 +36,15 @@ $(underlays): git config remote.origin.push +refs/heads/master:refs/heads/$(master); \ fi +pot: $(potfiles) + +# FIXME: The po4a plugin for HTML::Template needs to be written... +$(potfiles): underlay=$(patsubst po/%.pot,%,$@) +$(potfiles): fileformat=$(if $(filter templates,$(underlay)),htmltemplate,text) +$(potfiles): filetype=$(if $(filter templates,$(underlay)),tmpl,mdwn) +$(potfiles): + cd $(underlay) && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(shell cd "$(underlay)" && find * -type f -name '*.$(filetype)')) -p $(CURDIR)/$@ + $(dummies): mkdir -p $@ @@ -44,4 +58,5 @@ ultraclean: rm -rf $(dir $(underlays_l10n)) rm -rf $(dummies) -.PHONY: $(underlays) + +.PHONY: pot po translations $(underlays) -- cgit v1.2.3 From f4425f5d9a36bfc3a4ec81aee2d27f992d266e94 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 4 Nov 2007 18:37:13 +0100 Subject: Fix stripping templates from pot make targets. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d4c574a..76df242 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l1 # FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) #potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source)))) -potfiles = $(filter-out templates,$(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source))))) +$(error potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source)))))) pofiles = $(foreach locale, $(locales_$(source)), $(patsubst %.pot/%.$(locale).po,$(locale))) source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) -- cgit v1.2.3 From 313bce6e443b2938846208a7a8c058ada82bd72e Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 4 Nov 2007 18:39:35 +0100 Subject: Remove debug cruft from Makefile. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 76df242..df8a840 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l1 # FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) #potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source)))) -$(error potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source)))))) +potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source))))) pofiles = $(foreach locale, $(locales_$(source)), $(patsubst %.pot/%.$(locale).po,$(locale))) source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) -- cgit v1.2.3 From 878d9fe80a619e8427c14a9296e60c1820a5d225 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 4 Nov 2007 21:05:25 +0100 Subject: Add make rule to generate po files. --- Makefile | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index df8a840..22779aa 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l1 # FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) #potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source)))) potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source))))) -pofiles = $(foreach locale, $(locales_$(source)), $(patsubst %.pot/%.$(locale).po,$(locale))) +pofiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %.pot,%.$(locale).po,$(potfiles)))) source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) origin = $(origin_$(source_of_underlay)) @@ -37,13 +37,30 @@ $(underlays): fi pot: $(potfiles) +po: pot $(pofiles) # FIXME: The po4a plugin for HTML::Template needs to be written... $(potfiles): underlay=$(patsubst po/%.pot,%,$@) -$(potfiles): fileformat=$(if $(filter templates,$(underlay)),htmltemplate,text) -$(potfiles): filetype=$(if $(filter templates,$(underlay)),tmpl,mdwn) +$(pofiles): underlay=$(basename $(patsubst po/%.po,%,$@)) +$(pofiles): locale=$(patsubst .%,%,$(suffix $(patsubst po/%.po,%,$@))) +$(pofiles): underlay_l10n=$(underlay)_l10n/$(locale) +$(potfiles) $(pofiles): fileformat = $(if $(filter templates,$(underlay)),htmltemplate,text) +$(potfiles) $(pofiles): filetype = $(if $(filter templates,$(underlay)),tmpl,mdwn) +$(potfiles) $(pofiles): srcfiles = $(shell cd "$(underlay)" && find * -type f -name '*.$(filetype)') + $(potfiles): - cd $(underlay) && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(shell cd "$(underlay)" && find * -type f -name '*.$(filetype)')) -p $(CURDIR)/$@ + cd $(underlay) && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) -p $(CURDIR)/$@ + +ifeq ($(translation_mode),init) +$(pofiles): +# cd $(underlay) && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) $(patsubst %,-l $(CURDIR)/$(underlay_l10n)/%,$(srcfiles)) -p $(CURDIR)/$@ + ( cd "$(underlay)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) $(patsubst %,-l $(CURDIR)/$(underlay_l10n)/%,$(srcfiles)) ) \ + | grep -v '#, fuzzy' \ + > $@ +else +$(pofiles): + cd "$(underlay)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) -p $(CURDIR)/$@ +endif $(dummies): mkdir -p $@ -- cgit v1.2.3 From d1edd0ef291fe4bbac81c5895aebbe6b56e3c9dd Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 5 Nov 2007 11:15:46 +0100 Subject: Add make rule to generate l10n files. Tighten variables (rename underlay to masterdir when used not as token but as dir). --- Makefile | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 22779aa..a4ca54a 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,19 @@ underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l1 #potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source)))) potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source))))) pofiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %.pot,%.$(locale).po,$(potfiles)))) +l10nfiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay))))) source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) origin = $(origin_$(source_of_underlay)) master = $(master_$(source_of_underlay)) +masterdir = $(underlay) +l10ndir = $(underlay)_l10n/$(locale) +# FIXME: The po4a plugin for HTML::Template needs to be written... +fileformat = $(if $(filter templates,$(underlay)),htmltemplate,text) +filetype = $(if $(filter templates,$(underlay)),tmpl,mdwn) +l10nfiles_in_underlay = $(shell cd "$(masterdir)" && find * -type f -name '*.$(filetype)') + all: $(underlays) $(dummies) $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) @@ -38,28 +46,34 @@ $(underlays): pot: $(potfiles) po: pot $(pofiles) +translations: po $(l10nfiles) -# FIXME: The po4a plugin for HTML::Template needs to be written... $(potfiles): underlay=$(patsubst po/%.pot,%,$@) -$(pofiles): underlay=$(basename $(patsubst po/%.po,%,$@)) -$(pofiles): locale=$(patsubst .%,%,$(suffix $(patsubst po/%.po,%,$@))) -$(pofiles): underlay_l10n=$(underlay)_l10n/$(locale) -$(potfiles) $(pofiles): fileformat = $(if $(filter templates,$(underlay)),htmltemplate,text) -$(potfiles) $(pofiles): filetype = $(if $(filter templates,$(underlay)),tmpl,mdwn) -$(potfiles) $(pofiles): srcfiles = $(shell cd "$(underlay)" && find * -type f -name '*.$(filetype)') - $(potfiles): - cd $(underlay) && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) -p $(CURDIR)/$@ + cd "$(masterdir)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) -p $(CURDIR)/$@ +$(pofiles): underlay=$(basename $(patsubst po/%.po,%,$@)) +$(pofiles): locale=$(patsubst .%,%,$(suffix $(patsubst po/%.po,%,$@))) ifeq ($(translation_mode),init) $(pofiles): -# cd $(underlay) && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) $(patsubst %,-l $(CURDIR)/$(underlay_l10n)/%,$(srcfiles)) -p $(CURDIR)/$@ - ( cd "$(underlay)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) $(patsubst %,-l $(CURDIR)/$(underlay_l10n)/%,$(srcfiles)) ) \ +# cd "$(masterdir)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) $(patsubst %,-l $(CURDIR)/$(l10ndir)/%,$(l10nfiles_in_underlay)) -p $(CURDIR)/$@ + ( cd "$(masterdir)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) $(patsubst %,-l $(CURDIR)/$(l10ndir)/%,$(l10nfiles_in_underlay)) ) \ | grep -v '#, fuzzy' \ > $@ else $(pofiles): - cd "$(underlay)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$(srcfiles)) -p $(CURDIR)/$@ + cd "$(masterdir)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) -p $(CURDIR)/$@ +endif + +#$(error $(l10nfiles):) +$(l10nfiles): underlay=$(patsubst %_l10n,%,$(firstword $(subst /, ,$@))) +$(l10nfiles): locale=$(patsubst %_l10n,%,$(word 2,$(subst /, ,$@))) +$(l10nfiles): + mkdir -p $(l10ndir) +ifeq ($(translation_mode),init) + cd "$(l10ndir)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) -m $(CURDIR)/$(patsubst $(l10ndir)/%,$(masterdir)/%,$@) -p $(CURDIR)/po/$(underlay).$(locale).po -l $(CURDIR)/$@ +else + cd "$(l10ndir)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -m $(CURDIR)/$(patsubst $(l10ndir)/%,$(masterdir)/%,$@) -p $(CURDIR)/po/$(underlay).$(locale).po -l $(CURDIR)/$@ endif $(dummies): -- cgit v1.2.3 From f84ec8c42dbf3406bd4d16d13a66e8f145ca362e Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 5 Nov 2007 13:40:32 +0100 Subject: Rename variables to prepare for using eval function in Makefile. --- Makefile | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index a4ca54a..daa7aca 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,26 @@ -sources = ikiwiki +SOURCES = ikiwiki -origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git -underlays_ikiwiki = basewiki smiley templates -master_ikiwiki = master$(locale:%=-$(locale)) -locales_ikiwiki = da +ikiwiki_ORIGIN = http://source.jones.dk/ikiwiki_MODULE.git +ikiwiki_UNDERLAYS = basewiki smiley templates +ikiwiki_BRANCH = master-LOCALE +ikiwiki_LOCALES = da -#dummies = content_dummy +#dummy_UNDERLAYS = content_dummy -underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) -underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) +# Everything after this is generic + +underlays_l10n = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %,%_l10n/$(locale),$($(source)_UNDERLAYS)))) +underlays = $(foreach source, $(SOURCES), $($(source)_UNDERLAYS)) $(underlays_l10n) # FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) -#potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source)))) -potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source))))) -pofiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %.pot,%.$(locale).po,$(potfiles)))) -l10nfiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay))))) - -source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) -origin = $(origin_$(source_of_underlay)) -master = $(master_$(source_of_underlay)) +#potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$($(source)_UNDERLAYS))) +potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$(filter-out templates,$($(source)_UNDERLAYS)))) +pofiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %.pot,%.$(locale).po,$(potfiles)))) +l10nfiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay))))) + +source_of_underlay = $(firstword $(foreach source, $(SOURCES), $(if $(filter $(underlay),$($(source)_UNDERLAYS)),$(source)))) +origin = $(subst MODULE,$(underlay),$($(source_of_underlay)_ORIGIN)) +master = $(subst -LOCALE,$(locale:%=-$(locale)),$($(source_of_underlay)_BRANCH)) masterdir = $(underlay) l10ndir = $(underlay)_l10n/$(locale) -- cgit v1.2.3 From 15e9e3c3dcbf746bca3c61ad9b3ee664f31f3060 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 5 Nov 2007 13:44:15 +0100 Subject: Fix renaming dummies -> dummy_UNDERLAYS. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index daa7aca..d70399b 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ fileformat = $(if $(filter templates,$(underlay)),htmltemplate,text) filetype = $(if $(filter templates,$(underlay)),tmpl,mdwn) l10nfiles_in_underlay = $(shell cd "$(masterdir)" && find * -type f -name '*.$(filetype)') -all: $(underlays) $(dummies) +all: $(underlays) $(dummy_UNDERLAYS) $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) $(underlays): underlay=$(@:%_l10n/$(locale)=%) @@ -78,7 +78,7 @@ else cd "$(l10ndir)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -m $(CURDIR)/$(patsubst $(l10ndir)/%,$(masterdir)/%,$@) -p $(CURDIR)/po/$(underlay).$(locale).po -l $(CURDIR)/$@ endif -$(dummies): +$(dummy_UNDERLAYS): mkdir -p $@ install: @@ -89,7 +89,7 @@ install: ultraclean: rm -rf $(underlays) rm -rf $(dir $(underlays_l10n)) - rm -rf $(dummies) + rm -rf $(dummy_UNDERLAYS) .PHONY: pot po translations $(underlays) -- cgit v1.2.3 From 6c3a55bb6e487cb2dfa8f49a93683241d02ea526 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 5 Nov 2007 13:48:32 +0100 Subject: Rename *_UNDERLAYS -> *_MODULES in Makefile. --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d70399b..73ce1bd 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,24 @@ SOURCES = ikiwiki ikiwiki_ORIGIN = http://source.jones.dk/ikiwiki_MODULE.git -ikiwiki_UNDERLAYS = basewiki smiley templates +ikiwiki_MODULES = basewiki smiley templates ikiwiki_BRANCH = master-LOCALE ikiwiki_LOCALES = da -#dummy_UNDERLAYS = content_dummy +#dummy_MODULES = content_dummy # Everything after this is generic -underlays_l10n = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %,%_l10n/$(locale),$($(source)_UNDERLAYS)))) -underlays = $(foreach source, $(SOURCES), $($(source)_UNDERLAYS)) $(underlays_l10n) +underlays_l10n = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %,%_l10n/$(locale),$($(source)_MODULES)))) +underlays = $(foreach source, $(SOURCES), $($(source)_MODULES)) $(underlays_l10n) # FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) -#potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$($(source)_UNDERLAYS))) -potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$(filter-out templates,$($(source)_UNDERLAYS)))) +#potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$($(source)_MODULES))) +potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$(filter-out templates,$($(source)_MODULES)))) pofiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %.pot,%.$(locale).po,$(potfiles)))) l10nfiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay))))) -source_of_underlay = $(firstword $(foreach source, $(SOURCES), $(if $(filter $(underlay),$($(source)_UNDERLAYS)),$(source)))) +source_of_underlay = $(firstword $(foreach source, $(SOURCES), $(if $(filter $(underlay),$($(source)_MODULES)),$(source)))) origin = $(subst MODULE,$(underlay),$($(source_of_underlay)_ORIGIN)) master = $(subst -LOCALE,$(locale:%=-$(locale)),$($(source_of_underlay)_BRANCH)) @@ -29,7 +29,7 @@ fileformat = $(if $(filter templates,$(underlay)),htmltemplate,text) filetype = $(if $(filter templates,$(underlay)),tmpl,mdwn) l10nfiles_in_underlay = $(shell cd "$(masterdir)" && find * -type f -name '*.$(filetype)') -all: $(underlays) $(dummy_UNDERLAYS) +all: $(underlays) $(dummy_MODULES) $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) $(underlays): underlay=$(@:%_l10n/$(locale)=%) @@ -78,7 +78,7 @@ else cd "$(l10ndir)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -m $(CURDIR)/$(patsubst $(l10ndir)/%,$(masterdir)/%,$@) -p $(CURDIR)/po/$(underlay).$(locale).po -l $(CURDIR)/$@ endif -$(dummy_UNDERLAYS): +$(dummy_MODULES): mkdir -p $@ install: @@ -89,7 +89,7 @@ install: ultraclean: rm -rf $(underlays) rm -rf $(dir $(underlays_l10n)) - rm -rf $(dummy_UNDERLAYS) + rm -rf $(dummy_MODULES) .PHONY: pot po translations $(underlays) -- cgit v1.2.3 From cfd0df9f98dc6024cff516018e7b6c71707ad88c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 5 Nov 2007 23:58:51 +0100 Subject: Major Makefile rewrite to use eval functions. --- Makefile | 171 +++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 105 insertions(+), 66 deletions(-) diff --git a/Makefile b/Makefile index 73ce1bd..5fb858d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ SOURCES = ikiwiki ikiwiki_ORIGIN = http://source.jones.dk/ikiwiki_MODULE.git -ikiwiki_MODULES = basewiki smiley templates +ikiwiki_MODULES = templates basewiki smiley +ikiwiki_POMODULES = basewiki smiley ikiwiki_BRANCH = master-LOCALE ikiwiki_LOCALES = da @@ -9,87 +10,125 @@ ikiwiki_LOCALES = da # Everything after this is generic -underlays_l10n = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %,%_l10n/$(locale),$($(source)_MODULES)))) -underlays = $(foreach source, $(SOURCES), $($(source)_MODULES)) $(underlays_l10n) - -# FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup) -#potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$($(source)_MODULES))) -potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$(filter-out templates,$($(source)_MODULES)))) -pofiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %.pot,%.$(locale).po,$(potfiles)))) -l10nfiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay))))) - -source_of_underlay = $(firstword $(foreach source, $(SOURCES), $(if $(filter $(underlay),$($(source)_MODULES)),$(source)))) -origin = $(subst MODULE,$(underlay),$($(source_of_underlay)_ORIGIN)) -master = $(subst -LOCALE,$(locale:%=-$(locale)),$($(source_of_underlay)_BRANCH)) - -masterdir = $(underlay) -l10ndir = $(underlay)_l10n/$(locale) -# FIXME: The po4a plugin for HTML::Template needs to be written... -fileformat = $(if $(filter templates,$(underlay)),htmltemplate,text) -filetype = $(if $(filter templates,$(underlay)),tmpl,mdwn) -l10nfiles_in_underlay = $(shell cd "$(masterdir)" && find * -type f -name '*.$(filetype)') - -all: $(underlays) $(dummy_MODULES) - -$(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) -$(underlays): underlay=$(@:%_l10n/$(locale)=%) -$(underlays): - mkdir -p $@ - @if [ -d "$@/.git" ]; then \ - cd $@ && \ +# FIXME: Not all of these are used within templates +masterdir = $(module) +l10ndir = $(module)_l10n/$(locale) +podir = po + +all: $(SOURCES) + +install: + $(error FIXME: you need to adjust ikiwiki.setup first!) +# ikiwiki --setup ikiwiki.setup --rebuild + + + +# 1:source 2:locales +define SOURCE_template +$(1): $$($(1)_MODULES) $(foreach module,$$($(1)_MODULES),$(foreach locale,$(2),$(module)_l10n/$(locale))) $(dummy_MODULES) +L10N_MODULES += $$(foreach locale,$(2),$(1)_l10n/$$(locale)) +endef +#$(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_LOCALES)))) + +# 1:moduledir 2:locale 3:mastermodule 4:source +define MODULE_template +$(4): $(1) + +$(1): origin = $$(subst MODULE,$(3),$$($(4)_ORIGIN)) +$(1): master = $$(subst -LOCALE,$(2:%=-$(2)),$$($(4)_BRANCH)) +$(1): + mkdir -p $$@ + @if [ -d "$$@/.git" ]; then \ + cd $$@ && \ git pull; \ else \ - cd $@ && \ + cd $$@ && \ git init && \ - git remote add -f -t $(master) -m $(master) origin $(origin) && \ + git remote add -f -t $$(master) -m $$(master) origin $$(origin) && \ git merge origin && \ - git config remote.origin.push +refs/heads/master:refs/heads/$(master); \ + git config remote.origin.push +refs/heads/master:refs/heads/$$(master); \ fi -pot: $(potfiles) -po: pot $(pofiles) -translations: po $(l10nfiles) -$(potfiles): underlay=$(patsubst po/%.pot,%,$@) -$(potfiles): - cd "$(masterdir)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) -p $(CURDIR)/$@ +# WARNING: this may wipe unrelated files too! +ultraclean:: + rm -rf "$(1)" +ifneq ($(2),) + rm -rf "$(dir $(1))" +endif + +.PHONY: $(1) +endef +$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(eval $(call MODULE_template,$(masterdir),,$(module),$(source))))) +$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(foreach locale,$($(source)_LOCALES),$(eval $(call MODULE_template,$(l10ndir),$(locale),$(module),$(source)))))) + + + +# 1:moduledir 2:locale 3:mastermodule 4:source +define POT_template +fileformat = $(if $(filter templates,$(3)),htmltemplate,text) +filetype = $(if $(filter templates,$(3)),tmpl,mdwn) +ALL_POTFILES += $(podir)/$(3).pot +$(3)_L10NFILES = $$(shell cd "$(1)" && find * -type f -name '*.$$(filetype)') +ALL_L10NFILES += $(patsubst %,$(1)/%,$(3)_L10NFILES) + +$(podir)/$(3).pot: $(1) + cd "$(1)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + +.PHONY: $(1) +endef +$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(eval $(call POT_template,$(masterdir),,$(module),$(source))))) + + + +# 1:moduledir 2:locale 3:mastermodule 4:source +define PO_template +fileformat = $(if $(filter templates,$(3)),htmltemplate,text) +filetype = $(if $(filter templates,$(3)),tmpl,mdwn) +ALL_POFILES += $(podir)/$(3).$(2).po -$(pofiles): underlay=$(basename $(patsubst po/%.po,%,$@)) -$(pofiles): locale=$(patsubst .%,%,$(suffix $(patsubst po/%.po,%,$@))) ifeq ($(translation_mode),init) -$(pofiles): -# cd "$(masterdir)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) $(patsubst %,-l $(CURDIR)/$(l10ndir)/%,$(l10nfiles_in_underlay)) -p $(CURDIR)/$@ - ( cd "$(masterdir)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) $(patsubst %,-l $(CURDIR)/$(l10ndir)/%,$(l10nfiles_in_underlay)) ) \ +$(podir)/$(3).$(2).po: $(1) $(3) + ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ - > $@ -else -$(pofiles): - cd "$(masterdir)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$(l10nfiles_in_underlay)) -p $(CURDIR)/$@ -endif + > $$@ -#$(error $(l10nfiles):) -$(l10nfiles): underlay=$(patsubst %_l10n,%,$(firstword $(subst /, ,$@))) -$(l10nfiles): locale=$(patsubst %_l10n,%,$(word 2,$(subst /, ,$@))) -$(l10nfiles): - mkdir -p $(l10ndir) -ifeq ($(translation_mode),init) - cd "$(l10ndir)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) -m $(CURDIR)/$(patsubst $(l10ndir)/%,$(masterdir)/%,$@) -p $(CURDIR)/po/$(underlay).$(locale).po -l $(CURDIR)/$@ +# FIXME: needs to depend also on its masterfile +$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po + mkdir -p $(1) + cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ else - cd "$(l10ndir)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -m $(CURDIR)/$(patsubst $(l10ndir)/%,$(masterdir)/%,$@) -p $(CURDIR)/po/$(underlay).$(locale).po -l $(CURDIR)/$@ +$(podir)/$(3).$(2).po: $(3) + cd "$(3)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + +$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po + mkdir -p $(1) + cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endif -$(dummy_MODULES): - mkdir -p $@ +.PHONY: $(1) +endef +$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_LOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) -install: - $(error FIXME: you need to adjust ikiwiki.setup first!) -# ikiwiki --setup ikiwiki.setup --rebuild + + +# 1:dummydir +define DUMMYMODULE_template +$(1): + mkdir -p $$@ # WARNING: this may wipe unrelated files too! -ultraclean: - rm -rf $(underlays) - rm -rf $(dir $(underlays_l10n)) - rm -rf $(dummy_MODULES) +ultraclean:: + rm -rf "$(1)" +endef +$(foreach module,$(dummy_MODULES),$(eval $(call DUMMYMODULE_template,$(masterdir)))) + + + +pot: $(ALL_POTFILES) +po: $(ALL_POFILES) +translations: $(ALL_L10NFILES) + -.PHONY: pot po translations $(underlays) +.PHONY: all $(SOURCES) pot po translations -- cgit v1.2.3 From fb793d8a6f580f0dd32347a8df1867195237291d Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 11:19:40 +0100 Subject: Define ikiwiki config files in variable at top of Makefile. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5fb858d..3c7a46c 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ ikiwiki_LOCALES = da #dummy_MODULES = content_dummy +#CONFIGS = ikiwiki.setup + # Everything after this is generic # FIXME: Not all of these are used within templates @@ -18,8 +20,11 @@ podir = po all: $(SOURCES) install: +ifneq ($(strip $(CONFIGS)),) + $(CONFIGS:%=ikiwiki --setup % --rebuild) +else $(error FIXME: you need to adjust ikiwiki.setup first!) -# ikiwiki --setup ikiwiki.setup --rebuild +endif -- cgit v1.2.3 From 98db86ccbcdad71182be70d3a74ab99d65fb9e82 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 11:33:24 +0100 Subject: Fix Makefile install target; change it to an eval'ed template. Slightly improve hints in Makefile. Add some targets to .PHONY. --- Makefile | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3c7a46c..08a3354 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ ikiwiki_LOCALES = da #dummy_MODULES = content_dummy +# uncomment this when ikiwiki.setup is configured for the local environment #CONFIGS = ikiwiki.setup # Everything after this is generic @@ -19,13 +20,6 @@ podir = po all: $(SOURCES) -install: -ifneq ($(strip $(CONFIGS)),) - $(CONFIGS:%=ikiwiki --setup % --rebuild) -else - $(error FIXME: you need to adjust ikiwiki.setup first!) -endif - # 1:source 2:locales @@ -130,10 +124,30 @@ $(foreach module,$(dummy_MODULES),$(eval $(call DUMMYMODULE_template,$(masterdir +# 1:configfile +define CONFIG_template +$(1): + mkdir -p $$@ + +# WARNING: this may wipe unrelated files too! +install:: + ikiwiki --setup $(1) --rebuild +endef +$(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config)))) + + + +install: +ifneq ($(strip $(CONFIGS)),) + $(error Please configure ikiwiki.setup and then uncomment it at the top of the Makefile!) +endif + + + pot: $(ALL_POTFILES) po: $(ALL_POFILES) translations: $(ALL_L10NFILES) -.PHONY: all $(SOURCES) pot po translations +.PHONY: all $(SOURCES) pot po translations install ultraclean -- cgit v1.2.3 From 74e15aa80e8234cfefabe109e810eadb6d50f982 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 12:10:17 +0100 Subject: Fix fallback fail-and-hint install target in Makefile, and move it up below all target. --- Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 08a3354..881332d 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,11 @@ podir = po all: $(SOURCES) +install:: +ifeq ($(strip $(CONFIGS)),) + $(error Please configure ikiwiki.setup and then uncomment it at the top of the Makefile!) +endif + # 1:source 2:locales @@ -137,13 +142,6 @@ $(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config)))) -install: -ifneq ($(strip $(CONFIGS)),) - $(error Please configure ikiwiki.setup and then uncomment it at the top of the Makefile!) -endif - - - pot: $(ALL_POTFILES) po: $(ALL_POFILES) translations: $(ALL_L10NFILES) -- cgit v1.2.3 From e2341646973fc68b3be40bd6ae4e978feb46f2ea Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 12:59:04 +0100 Subject: Fix resolving translations target in Makefile. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 881332d..32a2057 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POTFILES += $(podir)/$(3).pot $(3)_L10NFILES = $$(shell cd "$(1)" && find * -type f -name '*.$$(filetype)') -ALL_L10NFILES += $(patsubst %,$(1)/%,$(3)_L10NFILES) +ALL_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).pot: $(1) cd "$(1)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ -- cgit v1.2.3 From bb366f13cd98e6f005106e1ad7a73bbaaff573a8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 13:01:04 +0100 Subject: Separate normal PO routines from initializing new locales in Makefile. --- Makefile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 32a2057..4fa08a9 100644 --- a/Makefile +++ b/Makefile @@ -86,12 +86,14 @@ $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(eval $(cal # 1:moduledir 2:locale 3:mastermodule 4:source -define PO_template +define INITPO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POFILES += $(podir)/$(3).$(2).po -ifeq ($(translation_mode),init) +$(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) +$(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) + $(podir)/$(3).$(2).po: $(1) $(3) ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ @@ -101,18 +103,29 @@ $(podir)/$(3).$(2).po: $(1) $(3) $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ -else + +.PHONY: $(1) +endef +$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source)))))) + + + +# 1:moduledir 2:locale 3:mastermodule 4:source +define PO_template +fileformat = $(if $(filter templates,$(3)),htmltemplate,text) +filetype = $(if $(filter templates,$(3)),tmpl,mdwn) +ALL_POFILES += $(podir)/$(3).$(2).po + $(podir)/$(3).$(2).po: $(3) cd "$(3)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ -endif .PHONY: $(1) endef -$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_LOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) +$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) -- cgit v1.2.3 From 4b43f104988f6fdff8ddee2b13ce2ba066443559 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 13:56:20 +0100 Subject: Update documentation: Adjust make command for overriding GIT source. Add section on translation. --- README | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/README b/README index 43dffa1..3aa53f2 100644 --- a/README +++ b/README @@ -25,9 +25,10 @@ To pull in all translatable and translated parts, do this: make -To pull in all parts with write access to the repository, do this: +To pull in all parts with write access to the repository, do something like +this: - make origin_ikiwiki='login@example.com:path/to/repositories/ikiwiki_$(underlay).git' + make origin_ikiwiki='login@example.com:path/to/repositories/ikiwiki_MODULE.git' To remove all translatable and translated parts, and anything else below those directories without warning, do this: @@ -59,6 +60,41 @@ like this (skip first command on subsequent updates): git pull ikiwiki master +Translation +----------- + +Some modules (markdown files - template files are not yet supported by po4a) is +translatable through the gettext system using PO files. + +To update PO templates for all modules marked as supporting gettext, do this: + + make pot + +To update PO files for all supported locales of all supported modules, do this: + + make po + +To update all gettext-supported modules based on newer PO files, do this: + + make translations + +To initialize new locales, do like this (all on one line): + + make po po-init-modules="module1 module2" po-init-locales="da sv no" + +If you want to initialize based on an existing locale rather than the master, +add the origin locale to the above make command similar to this: + + make po [...] po-init-fromlocale=de + +To add new modules and locales as gettext supported, add them to *_POMODULES +and *_POLOCALES. Keep them alse in *_MODULES and *_LOCALES to support pulling +final translations without recreating from PO files. + +Please beware that the automated po4a process is not perfected yet, so check +the result before use. + + ---- References: -- cgit v1.2.3 From 60a19d884ff7aee15f2cd641182283da9c00c396 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 14:04:41 +0100 Subject: Fix init'ing new locales from master if po-init-fromlocale is empty. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4fa08a9..1cee0d2 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(eval $(cal -# 1:moduledir 2:locale 3:mastermodule 4:source +# 1:moduledir 2:locale 3:mastermodule 4:source 5:originmodule define INITPO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) @@ -95,18 +95,18 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(1) $(3) - ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ + ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ > $$@ # FIXME: needs to depend also on its masterfile $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ + cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $$(patsubst $(1)/%,$(CURDIR)/$(5)/%,$$@) .PHONY: $(1) endef -$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source)))))) +$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module))))))) -- cgit v1.2.3 From d877226cbe21a862d41ceb6420d0fb06e00200b5 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 14:17:15 +0100 Subject: Fix translations target (fix dependency resolving on ALL_L10FILES and ALL_MASTEFILES) in Makefile. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1cee0d2..a365788 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POTFILES += $(podir)/$(3).pot $(3)_L10NFILES = $$(shell cd "$(1)" && find * -type f -name '*.$$(filetype)') -ALL_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) +ALL_MASTERFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).pot: $(1) cd "$(1)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ @@ -90,6 +90,7 @@ define INITPO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POFILES += $(podir)/$(3).$(2).po +ALL_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) @@ -115,6 +116,7 @@ define PO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POFILES += $(podir)/$(3).$(2).po +ALL_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).$(2).po: $(3) cd "$(3)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ @@ -157,6 +159,7 @@ $(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config)))) pot: $(ALL_POTFILES) po: $(ALL_POFILES) +$(ALL_L10NFILES): $(ALL_MASTERFILES) translations: $(ALL_L10NFILES) -- cgit v1.2.3 From 0ddc1a31cb78d1bce3aa4884cb2c8a4ee7bcb16b Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 14:24:59 +0100 Subject: Fix overwriting origin file instead of creating a new one when init'ing translations in Makefile. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a365788..d8c5e35 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ $(podir)/$(3).$(2).po: $(1) $(3) # FIXME: needs to depend also on its masterfile $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $$(patsubst $(1)/%,$(CURDIR)/$(5)/%,$$@) + cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ .PHONY: $(1) endef -- cgit v1.2.3 From b747c50e13c622436b99f3df939a9f50e183f3ce Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 14:34:13 +0100 Subject: Avoid chdir in shell code (strip leading path afterwards instead) when resolving *_L10NFILES in Makefile. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d8c5e35..380955a 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ define POT_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POTFILES += $(podir)/$(3).pot -$(3)_L10NFILES = $$(shell cd "$(1)" && find * -type f -name '*.$$(filetype)') +$(3)_L10NFILES = $$(patsubst $(1)/%,%,$$(shell find $(1) -type f -name '*.$$(filetype)')) ALL_MASTERFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).pot: $(1) -- cgit v1.2.3 From bc7344a2af5737d59cd8cea4a5c2c020c6116682 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 14:39:14 +0100 Subject: Rename ALL_L10NFILES -> LOCALE_L10NFILES and ALL_MASTERFILES -> MASTER_L10NFILES in Makefile. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 380955a..d37731e 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POTFILES += $(podir)/$(3).pot $(3)_L10NFILES = $$(patsubst $(1)/%,%,$$(shell find $(1) -type f -name '*.$$(filetype)')) -ALL_MASTERFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) +MASTER_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).pot: $(1) cd "$(1)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ @@ -90,7 +90,7 @@ define INITPO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POFILES += $(podir)/$(3).$(2).po -ALL_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) +LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) @@ -116,7 +116,7 @@ define PO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POFILES += $(podir)/$(3).$(2).po -ALL_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) +LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).$(2).po: $(3) cd "$(3)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ @@ -159,8 +159,8 @@ $(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config)))) pot: $(ALL_POTFILES) po: $(ALL_POFILES) -$(ALL_L10NFILES): $(ALL_MASTERFILES) -translations: $(ALL_L10NFILES) +$(LOCALE_L10NFILES): $(MASTER_L10NFILES) +translations: $(LOCALE_L10NFILES) -- cgit v1.2.3 From b522d7f1246e7de306f3a087b85edc6582880fd0 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 15:12:32 +0100 Subject: Tighten .PHONY and other dependencies in Makefile. --- Makefile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d37731e..9ded975 100644 --- a/Makefile +++ b/Makefile @@ -29,10 +29,13 @@ endif # 1:source 2:locales define SOURCE_template -$(1): $$($(1)_MODULES) $(foreach module,$$($(1)_MODULES),$(foreach locale,$(2),$(module)_l10n/$(locale))) $(dummy_MODULES) -L10N_MODULES += $$(foreach locale,$(2),$(1)_l10n/$$(locale)) +$(1): $$($(1)_MODULES) $(dummy_MODULES) + +.PHONY: $(1) endef -#$(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_LOCALES)))) +$(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_LOCALES)))) + + # 1:moduledir 2:locale 3:mastermodule 4:source define MODULE_template @@ -95,7 +98,7 @@ LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) -$(podir)/$(3).$(2).po: $(1) $(3) +$(podir)/$(3).$(2).po: $(3) $(5) ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ > $$@ @@ -104,8 +107,6 @@ $(podir)/$(3).$(2).po: $(1) $(3) $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ - -.PHONY: $(1) endef $(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module))))))) @@ -124,8 +125,6 @@ $(podir)/$(3).$(2).po: $(3) $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ - -.PHONY: $(1) endef $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) @@ -160,7 +159,7 @@ $(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config)))) pot: $(ALL_POTFILES) po: $(ALL_POFILES) $(LOCALE_L10NFILES): $(MASTER_L10NFILES) -translations: $(LOCALE_L10NFILES) +translations: po $(LOCALE_L10NFILES) -- cgit v1.2.3 From 56d51d219a565180a5f3f385a65d7bff15a4653f Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 17:21:07 +0100 Subject: Use local Locale::Po4a::Text tweaked to not wrap paragraphs containing headlines, blockquotes, triple-quotes or html tags. --- Makefile | 10 +- perl/Locale/Po4a/Text.pm | 260 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 265 insertions(+), 5 deletions(-) create mode 100644 perl/Locale/Po4a/Text.pm diff --git a/Makefile b/Makefile index 9ded975..7f3f169 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ $(3)_L10NFILES = $$(patsubst $(1)/%,%,$$(shell find $(1) -type f -name '*.$$(fil MASTER_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).pot: $(1) - cd "$(1)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ .PHONY: $(1) endef @@ -99,14 +99,14 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(3) $(5) - ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ + ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ > $$@ # FIXME: needs to depend also on its masterfile $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef $(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module))))))) @@ -120,11 +120,11 @@ ALL_POFILES += $(podir)/$(3).$(2).po LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).$(2).po: $(3) - cd "$(3)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) diff --git a/perl/Locale/Po4a/Text.pm b/perl/Locale/Po4a/Text.pm new file mode 100644 index 0000000..836d2c1 --- /dev/null +++ b/perl/Locale/Po4a/Text.pm @@ -0,0 +1,260 @@ +#!/usr/bin/perl -w + +# Po4a::Text.pm +# +# extract and translate translatable strings from a text documents +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +######################################################################## + +=head1 NAME + +Locale::Po4a::Text - Convert text documents from/to PO files + +=head1 DESCRIPTION + +The po4a (po for anything) project goal is to ease translations (and more +interestingly, the maintenance of translations) using gettext tools on +areas where they were not expected like documentation. + +Locale::Po4a::Text is a module to help the translation of text documents into +other [human] languages. + +Paragraphs are splitted on empty lines (or lines containing only spaces or +tabulations). + +If a paragraph contains a line starting by a space (or tabulation), this +paragraph won't be rewrapped. + +=cut + +package Locale::Po4a::Text; + +use 5.006; +use strict; +use warnings; + +require Exporter; +use vars qw(@ISA @EXPORT); +@ISA = qw(Locale::Po4a::TransTractor); +@EXPORT = qw(); + +use Locale::Po4a::TransTractor; +use Locale::Po4a::Common; + +=head1 OPTIONS ACCEPTED BY THIS MODULE + +These are this module's particular options: + +=over + +=item B + +Deactivate detection of bullets. + +By default, when a bullet is detected, the bullet paragraph is not considered +as a verbatim paragraph (with the no-wrap flag in the PO file), but the module +rewrap this paragraph in the generated PO file and in the translation. + +=cut + +my $bullets = 1; + +=item B + +Handle the header and footer of +released versions, which only contain non translatable informations. + +=cut + +my $debianchangelog = 0; + +=item B + +Handle some special markup in Markdown-formatted texts. + +=cut + +my $markdown = 1; + +sub initialize { + my $self = shift; + my %options = @_; + + $self->{options}{'nobullets'}=''; + + if (defined $options{'nobullets'}) { + $bullets = 0; + } + + if (defined $options{'debianchangelog'}) { + $debianchangelog=1; + } + + if (defined $options{'markdown'}) { + $markdown=1; + } +} + +sub parse { + my $self = shift; + my ($line,$ref); + my $paragraph=""; + my $wrapped_mode = 1; + my $expect_header = 1; + ($line,$ref)=$self->shiftline(); + while (defined($line)) { + chomp($line); + $self->{ref}="$ref"; + if ($debianchangelog and + $expect_header and + $line =~ /^(\w[-+0-9a-z.]*)\ \(([^\(\) \t]+)\) # src, version + \s+([-+0-9a-z.]+); # distribution + \s*urgency\s*\=\s*(.*\S)\s*$/ix) { # + do_paragraph($self,$paragraph,$wrapped_mode); + $paragraph=""; + $self->pushline("$line\n"); + $expect_header=0; + } elsif ($debianchangelog and + $line =~ m/^ \-\- (.*) <(.*)> ((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}(\s+\([^\\\(\)]\))?)$/) { + # Found trailer + do_paragraph($self,$paragraph,$wrapped_mode); + $paragraph=""; + $self->pushline("$line\n"); + $expect_header=1; + } elsif ($line =~ /^\s*$/) { + # Break paragraphs on lines containing only spaces + do_paragraph($self,$paragraph,$wrapped_mode); + $self->pushline("\n") unless ( $wrapped_mode == 0 + or $paragraph eq ""); + $paragraph=""; + $wrapped_mode = 1; + $self->pushline($line."\n"); + } elsif ( $line =~ /^=*$/ + or $line =~ /^_*$/ + or $line =~ /^-*$/) { + $wrapped_mode = 0; + $paragraph .= $line."\n"; + do_paragraph($self,$paragraph,$wrapped_mode); + $paragraph=""; + $wrapped_mode = 1; + } elsif ($markdown and + ( $line =~ m/^#/ # headline + or $line =~ m/^>/ # blockquote + or $line =~ m/[<>]/ # maybe html + or $line =~ m/^"""/ # textblock inside macro end + or $line =~ m/"""$/)) { # textblock inside macro begin + # Found headline + $wrapped_mode = 0; + $paragraph .= $line."\n"; + do_paragraph($self,$paragraph,$wrapped_mode); + $paragraph=""; + $wrapped_mode = 1; + } else { + if ($line =~ /^\s/) { + # A line starting by a space indicates a non-wrap + # paragraph + $wrapped_mode = 0; + } + $paragraph .= $line."\n"; + } + # paragraphs starting by a bullet, or numbered + # or paragraphs with a line containing many consecutive spaces + # (more than 3) + # are considered as verbatim paragraphs + $wrapped_mode = 0 if ( $paragraph =~ m/^(\*|[0-9]+[.)] )/s + or $paragraph =~ m/[ \t][ \t][ \t]/s); + ($line,$ref)=$self->shiftline(); + } + if (length $paragraph) { + do_paragraph($self,$paragraph,$wrapped_mode); + } +} + +sub do_paragraph { + my ($self, $paragraph, $wrap) = (shift, shift, shift); + return if ($paragraph eq ""); + + if ($bullets) { + # Detect bullets + # | * blah blah + # | blah + # | ^-- aligned + # + # + # Other bullets supported: + # - blah o blah + blah + # 1. blah 1) blah (1) blah +TEST_BULLET: + if ($paragraph =~ m/^(\s*)((?:[-*o+]|([0-9]+[.\)])|\([0-9]+\))\s+)([^\n]*\n)(.*)$/s) { + my $para = $5; + my $bullet = $2; + my $indent1 = $1; + my $indent2 = "$1".(' ' x length $bullet); + my $text = $4; + while ($para !~ m/$indent2(?:[-*o+]|([0-9]+[.\)])|\([0-9]+\))\s+/ + and $para =~ s/^$indent2(\S[^\n]*\n)//s) { + $text .= $1; + } + # TODO: detect if a line starts with the same bullet + if ($text !~ m/\S[ \t][ \t][ \t]+\S/s) { + my $bullet_regex = quotemeta($indent1.$bullet); + $bullet_regex =~ s/[0-9]+/\\d\+/; + if ($para eq '' or $para =~ m/^$bullet_regex\S/s) { + my $trans = $self->translate($text, + $self->{ref}, + "Bullet: '$indent1$bullet'", + "wrap" => 1, + "wrapcol" => - (length $indent2)); + $trans =~ s/^/$indent1$bullet/s; + $trans =~ s/\n(.)/\n$indent2$1/sg; + $self->pushline( $trans."\n" ); + if ($para eq '') { + return; + } else { + # Another bullet + $paragraph = $para; + goto TEST_BULLET; + } + } + } + } + } + # TODO: detect indented paragraphs + + $self->pushline( $self->translate($paragraph, + $self->{ref}, + "Plain text", + "wrap" => $wrap) ); +} + +1; + +=head1 STATUS OF THIS MODULE + +Tested successfully on simple text files and NEWS.Debian files. + +=head1 AUTHORS + + Nicolas François + +=head1 COPYRIGHT AND LICENSE + + Copyright 2005,2007 by Nicolas FRANÇOIS . + +This program is free software; you may redistribute it and/or modify it +under the terms of GPL (see the COPYING file). -- cgit v1.2.3 From 90cc8b9c07c6fecdb8b9ff560e915fe0aa23871c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 17:27:18 +0100 Subject: Disable markdown tweaks by default in po4a perl module, and instead enable them explicitly in Makefile. --- Makefile | 10 +++++----- perl/Locale/Po4a/Text.pm | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7f3f169..e7ef13c 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ $(3)_L10NFILES = $$(patsubst $(1)/%,%,$$(shell find $(1) -type f -name '*.$$(fil MASTER_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).pot: $(1) - cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ .PHONY: $(1) endef @@ -99,14 +99,14 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(3) $(5) - ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ + ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ > $$@ # FIXME: needs to depend also on its masterfile $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef $(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module))))))) @@ -120,11 +120,11 @@ ALL_POFILES += $(podir)/$(3).$(2).po LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).$(2).po: $(3) - cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-updatepo -M UTF-8 -f $(fileformat) -o markdown $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) diff --git a/perl/Locale/Po4a/Text.pm b/perl/Locale/Po4a/Text.pm index 836d2c1..ae62667 100644 --- a/perl/Locale/Po4a/Text.pm +++ b/perl/Locale/Po4a/Text.pm @@ -89,7 +89,7 @@ Handle some special markup in Markdown-formatted texts. =cut -my $markdown = 1; +my $markdown = 0; sub initialize { my $self = shift; -- cgit v1.2.3 From 0b26a19f2ae304d9710e00ac6d1c6c508f2a8787 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 9 Nov 2007 21:37:21 +0100 Subject: Better text about upstream GIT locations, including real example for write access. --- README | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index 3aa53f2..627b8d1 100644 --- a/README +++ b/README @@ -12,8 +12,8 @@ the following locales: Getting the source ------------------ -This README file and related scripts are available at http://source.jones.dk/ -as a GIT repository. Pull it like this: +This README file is available at http://source.jones.dk/ together with a GIT +repository with source of the translation routines. Pull it like this: git clone http://source.jones.dk/ikiwiki.git @@ -25,10 +25,10 @@ To pull in all translatable and translated parts, do this: make -To pull in all parts with write access to the repository, do something like -this: +If you have write access to one or more GIT repositories, you can override +their locations like this: - make origin_ikiwiki='login@example.com:path/to/repositories/ikiwiki_MODULE.git' + make origin_ikiwiki=debian@source.jones.dk:/srv/git/source.jones.dk/ikiwiki_MODULE.git To remove all translatable and translated parts, and anything else below those directories without warning, do this: -- cgit v1.2.3 From 31e1796579331a8fa6c5bbfb8e307bc35d79792d Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 9 Nov 2007 21:42:09 +0100 Subject: Fix text about write access to upstream GIT to use new variable scheme. --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 627b8d1..c010624 100644 --- a/README +++ b/README @@ -28,7 +28,7 @@ To pull in all translatable and translated parts, do this: If you have write access to one or more GIT repositories, you can override their locations like this: - make origin_ikiwiki=debian@source.jones.dk:/srv/git/source.jones.dk/ikiwiki_MODULE.git + make ikiwiki_ORIGIN=debian@source.jones.dk:/srv/git/source.jones.dk/ikiwiki_MODULE.git To remove all translatable and translated parts, and anything else below those directories without warning, do this: -- cgit v1.2.3 From f9c7a9baa16d4d6a8e912ad8a69bf1c9605d4256 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 18 Feb 2008 23:47:13 +0100 Subject: Avoid updating po files when initializing: can't do both at once. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index e7ef13c..9ccb909 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,10 @@ $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef +# Only update if not initializing - can't do both at once +ifeq ($(po-init-modules),) $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) +endif -- cgit v1.2.3 From d4ebbb5aceb14f79b00bc24c2df91b87678299e9 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 18 Feb 2008 23:48:26 +0100 Subject: Fix initializing po files using localized texts (not master texts). --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ccb909..1f9444b 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(3) $(5) - ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \ + ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ > $$@ -- cgit v1.2.3 From e4791c0b7bb56ef717a218074f67b8f3423f3eae Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 18 Feb 2008 23:55:58 +0100 Subject: Fix creating po directory as needed when initializing po file. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 1f9444b..2653ff8 100644 --- a/Makefile +++ b/Makefile @@ -99,6 +99,7 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(3) $(5) + mkdir -p $(podir) ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ > $$@ -- cgit v1.2.3 From 64188765d41f586a2abfaa3bc60e2f836b01f151 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 19 Feb 2008 00:34:18 +0100 Subject: Don't strip fuzzy hints when initializing po files, and comment out rule only relevant for (not yet implemented) automated tests. --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 2653ff8..5dc46c2 100644 --- a/Makefile +++ b/Makefile @@ -99,15 +99,15 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(3) $(5) - mkdir -p $(podir) - ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ - | grep -v '#, fuzzy' \ - > $$@ + ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) -p $(CURDIR)/$$@) +# TODO: Implement the below for automated tests, after unfuzzing the above like this: +# grep -v '#, fuzzy' +# # FIXME: needs to depend also on its masterfile -$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po - mkdir -p $(1) - cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ +#$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po +# mkdir -p $(1) +# cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef $(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module))))))) -- cgit v1.2.3 From 218860ac4164f53d76134148745c192b9ab9c5a3 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 19 Feb 2008 00:37:40 +0100 Subject: Drop surrounding parens when initializing po files. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5dc46c2..afeaedb 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ $(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) $(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) $(podir)/$(3).$(2).po: $(3) $(5) - ( cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) -p $(CURDIR)/$$@) + cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) -p $(CURDIR)/$$@ # TODO: Implement the below for automated tests, after unfuzzing the above like this: # grep -v '#, fuzzy' -- cgit v1.2.3 From ff3de0f4926e36b75042f135f5c0ec1a84229821 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 19 Feb 2008 00:58:34 +0100 Subject: Enable i18n of smiley, and danish l10n. --- Makefile | 3 +- po/smiley.da.po | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ po/smiley.pot | 246 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 506 insertions(+), 1 deletion(-) create mode 100644 po/smiley.da.po create mode 100644 po/smiley.pot diff --git a/Makefile b/Makefile index afeaedb..77e1dfa 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,10 @@ SOURCES = ikiwiki ikiwiki_ORIGIN = http://source.jones.dk/ikiwiki_MODULE.git ikiwiki_MODULES = templates basewiki smiley -ikiwiki_POMODULES = basewiki smiley +ikiwiki_POMODULES = smiley ikiwiki_BRANCH = master-LOCALE ikiwiki_LOCALES = da +ikiwiki_POLOCALES = da #dummy_MODULES = content_dummy diff --git a/po/smiley.da.po b/po/smiley.da.po new file mode 100644 index 0000000..0b21ccc --- /dev/null +++ b/po/smiley.da.po @@ -0,0 +1,258 @@ +# Danish translation of smiley pages for ikiwiki. +# Copyright (C) 2008 Free Software Foundation, Inc. +# This file is distributed under the same license as the ikiwiki package. +# Jonas Smedegaard , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ikiwiki smiley 2.30\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-02-03 14:52-0500\n" +"PO-Revision-Date: 2008-02-11 00:12+0100\n" +"Last-Translator: Jonas Smedegaard \n" +"Language-Team: Danish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Danish\n" +"X-Poedit-Country: DENMARK\n" +"X-Poedit-SourceCharset: utf-8\n" + +# type: Plain text +#: smileys.mdwn:3 +msgid "" +"This page is used to control what smileys are supported by the wiki. Just " +"write the text of a smiley to display it." +msgstr "" +"Denne side bruges til at styre hvilke smileys denne wiki understøtter. " +"Skriv blot smiley-teksten for at vise den." + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:)\t[[smileys/smile.png]]" +msgstr "\\:)\t[[smileys/smile.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-)\t[[smileys/smile.png]]" +msgstr "\\:-)\t[[smileys/smile.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:D\t[[smileys/biggrin.png]]" +msgstr "\\:D\t[[smileys/biggrin.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-D\t[[smileys/biggrin.png]]" +msgstr "\\:-D\t[[smileys/biggrin.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\B)\t[[smileys/smile2.png]]" +msgstr "\\B)\t[[smileys/smile2.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\B-)\t[[smileys/smile2.png]]" +msgstr "\\B-)\t[[smileys/smile2.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:))\t[[smileys/smile3.png]]" +msgstr "\\:))\t[[smileys/smile3.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-))\t[[smileys/smile3.png]]" +msgstr "\\:-))\t[[smileys/smile3.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\;)\t[[smileys/smile4.png]]" +msgstr "\\;)\t[[smileys/smile4.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\;-)\t[[smileys/smile4.png]]" +msgstr "\\;-)\t[[smileys/smile4.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:\\\t[[smileys/ohwell.png]]" +msgstr "\\:\\\t[[smileys/ohwell.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-\\\t[[smileys/ohwell.png]]" +msgstr "\\:-\\\t[[smileys/ohwell.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:/\t[[smileys/ohwell.png]]" +msgstr "\\:/\t[[smileys/ohwell.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-/\t[[smileys/ohwell.png]]" +msgstr "\\:-/\t[[smileys/ohwell.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:|\t[[smileys/neutral.png]]" +msgstr "\\:|\t[[smileys/neutral.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-|\t[[smileys/neutral.png]]" +msgstr "\\:-|\t[[smileys/neutral.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\>:>\t[[smileys/devil.png]]" +msgstr "\\>:>\t[[smileys/devil.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:22 +msgid "\\X-(\t[[smileys/angry.png]]" +msgstr "\\X-(\t[[smileys/angry.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:22 +msgid "\\<:(\t[[smileys/frown.png]]" +msgstr "\\<:(\t[[smileys/frown.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:(\t[[smileys/sad.png]]" +msgstr "\\:(\t[[smileys/sad.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:-(\t[[smileys/sad.png]]" +msgstr "\\:-(\t[[smileys/sad.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:-?\t[[smileys/tongue.png]]" +msgstr "\\:-?\t[[smileys/tongue.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:-P\t[[smileys/tongue.png]]" +msgstr "\\:-P\t[[smileys/tongue.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:o\t[[smileys/redface.png]]" +msgstr "\\:o\t[[smileys/redface.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\|)\t[[smileys/tired.png]]" +msgstr "\\|)\t[[smileys/tired.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\|-)\t[[smileys/tired.png]]" +msgstr "\\|-)\t[[smileys/tired.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{OK}\t[[smileys/thumbs-up.png]]" +msgstr "\\{OK}\t[[smileys/thumbs-up.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{X}\t[[smileys/icon-error.png]]" +msgstr "\\{X}\t[[smileys/icon-error.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{i}\t[[smileys/icon-info.png]]" +msgstr "\\{i}\t[[smileys/icon-info.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\(./)\t[[smileys/checkmark.png]]" +msgstr "\\(./)\t[[smileys/checkmark.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\(!)\t[[smileys/idea.png]]" +msgstr "\\(!)\t[[smileys/idea.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\[!]\t[[smileys/attention.png]]" +msgstr "\\[!]\t[[smileys/attention.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\/!\\\t[[smileys/alert.png]]" +msgstr "\\/!\\\t[[smileys/alert.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\(?)\t[[smileys/question.png]]" +msgstr "\\(?)\t[[smileys/question.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{*}\t[[smileys/star_on.png]]" +msgstr "\\{*}\t[[smileys/star_on.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{o}\t[[smileys/star_off.png]]" +msgstr "\\{o}\t[[smileys/star_off.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{1} [[smileys/prio1.png]]" +msgstr "\\{1} [[smileys/prio1.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{2} [[smileys/prio2.png]]" +msgstr "\\{2} [[smileys/prio2.png]]" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{3} [[smileys/prio3.png]]" +msgstr "\\{3} [[smileys/prio3.png]]" + +# type: Plain text +#: smileys.mdwn:45 +msgid "For example: {*} B) {*}" +msgstr "Eksempel: {*} B) {*}" + +# type: Plain text +#: smileys.mdwn:46 +#, no-wrap +msgid "----\n" +msgstr "----\n" + +# type: Plain text +#: smileys.mdwn:52 +msgid "" +"To change the supported smileys, just edit the lists on this page. Note " +"that the format is important; each list item should start with the text that " +"is turned into the smiley, escaped so that users can see what produces it, " +"followed by a [[ikiwiki/WikiLink]] to the image to display." +msgstr "" +"Redigér listen på denne side for at ændre understøttede smileys. Bemærk at " +"formatet er vigtigt: hvert listeemne skal begynde med teksten der skal " +"omdannes til en smiley, omskrevet så brugere kan se hvordan det dannes, " +"efterfulgt af en [[ikiwiki/WikiLink]] til billedet der skal vises." + +# type: Plain text +#: smileys.mdwn:55 +msgid "" +"/!\\ Bear in mind that the link to the image needs to be written in a way " +"that will work if it's copied to other pages on the wiki. So be sure to " +"include the smileys directory in the path to the file." +msgstr "" +"/!\\ Tænk på at det er nødvendigt at skrive henvisningen til billedet på en " +"måde så det virker hvis det kopieres til andre sider på wikien. Sørg derfor " +"for at medtage smileys direkte i stien til filen." diff --git a/po/smiley.pot b/po/smiley.pot new file mode 100644 index 0000000..e4f2c95 --- /dev/null +++ b/po/smiley.pot @@ -0,0 +1,246 @@ +# LOCALE translation of smiley pages for ikiwiki. +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the ikiwiki package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ikiwiki smiley 2.30\n" +"POT-Creation-Date: 2008-02-19 00:42+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING" + +# type: Plain text +#: smileys.mdwn:3 +msgid "" +"This page is used to control what smileys are supported by the wiki. Just " +"write the text of a smiley to display it." +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:)\t[[smileys/smile.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-)\t[[smileys/smile.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:D\t[[smileys/biggrin.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-D\t[[smileys/biggrin.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\B)\t[[smileys/smile2.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\B-)\t[[smileys/smile2.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:))\t[[smileys/smile3.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-))\t[[smileys/smile3.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\;)\t[[smileys/smile4.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\;-)\t[[smileys/smile4.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:\\\t[[smileys/ohwell.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-\\\t[[smileys/ohwell.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:/\t[[smileys/ohwell.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-/\t[[smileys/ohwell.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:|\t[[smileys/neutral.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\:-|\t[[smileys/neutral.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:20 +msgid "\\>:>\t[[smileys/devil.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:22 +msgid "\\X-(\t[[smileys/angry.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:22 +msgid "\\<:(\t[[smileys/frown.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:(\t[[smileys/sad.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:-(\t[[smileys/sad.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:-?\t[[smileys/tongue.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:-P\t[[smileys/tongue.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\:o\t[[smileys/redface.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\|)\t[[smileys/tired.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\|-)\t[[smileys/tired.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{OK}\t[[smileys/thumbs-up.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{X}\t[[smileys/icon-error.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{i}\t[[smileys/icon-info.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\(./)\t[[smileys/checkmark.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\(!)\t[[smileys/idea.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\[!]\t[[smileys/attention.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\/!\\\t[[smileys/alert.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\(?)\t[[smileys/question.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{*}\t[[smileys/star_on.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{o}\t[[smileys/star_off.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{1} [[smileys/prio1.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{2} [[smileys/prio2.png]]" +msgstr "" + +# type: Bullet: '* ' +#: smileys.mdwn:43 +msgid "\\{3} [[smileys/prio3.png]]" +msgstr "" + +# type: Plain text +#: smileys.mdwn:45 +msgid "For example: {*} B) {*}" +msgstr "" + +# type: Plain text +#: smileys.mdwn:46 +#, no-wrap +msgid "----\n" +msgstr "" + +# type: Plain text +#: smileys.mdwn:52 +msgid "" +"To change the supported smileys, just edit the lists on this page. Note " +"that the format is important; each list item should start with the text that " +"is turned into the smiley, escaped so that users can see what produces it, " +"followed by a [[ikiwiki/WikiLink]] to the image to display." +msgstr "" + +# type: Plain text +#: smileys.mdwn:55 +msgid "" +"/!\\ Bear in mind that the link to the image needs to be written in a way " +"that will work if it's copied to other pages on the wiki. So be sure to " +"include the smileys directory in the path to the file." +msgstr "" -- cgit v1.2.3 From 596007948d77e562662b8e0c4031225999114288 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 19 Feb 2008 02:04:00 +0100 Subject: Improve hint about future unfuzz filter for testing newly initialized po files. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 77e1dfa..b3a4a38 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ $(podir)/$(3).$(2).po: $(3) $(5) cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) -p $(CURDIR)/$$@ # TODO: Implement the below for automated tests, after unfuzzing the above like this: -# grep -v '#, fuzzy' +# grep -v '^#, fuzzy$' | sed 's/^#, fuzzy,/#,/' # # FIXME: needs to depend also on its masterfile #$$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po -- cgit v1.2.3 From 00213b908971a2ce241f4e11e6966382d25af376 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 19 Feb 2008 03:23:52 +0100 Subject: Fix dollar escaping within expansion. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b3a4a38..b622f62 100644 --- a/Makefile +++ b/Makefile @@ -122,11 +122,11 @@ ALL_POFILES += $(podir)/$(3).$(2).po LOCALE_L10NFILES += $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)) $(podir)/$(3).$(2).po: $(3) - cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-updatepo -M UTF-8 -f $(fileformat) -o markdown $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ + cd "$(3)" && PERL5LIB="$(CURDIR)/perl" po4a-updatepo -M UTF-8 -f $(fileformat) -o markdown $$(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) - cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ + cd "$(1)" && PERL5LIB="$(CURDIR)/perl" po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) -o markdown $$(patsubst $(1)/%,-m $$(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ endef # Only update if not initializing - can't do both at once ifeq ($(po-init-modules),) -- cgit v1.2.3 From 7bebdfed991617822e7a8056e141ae0832e5a938 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 22 Feb 2008 02:46:39 +0100 Subject: Sync ikiwiki.setup with ikiwiki 2.32.3. --- ikiwiki.setup | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/ikiwiki.setup b/ikiwiki.setup index 3a0658e..c96a45f 100644 --- a/ikiwiki.setup +++ b/ikiwiki.setup @@ -23,7 +23,6 @@ use IkiWiki::Setup::Standard { #rcs => "svn", #historyurl => "http://svn.example.org/trunk/[[file]]", #diffurl => "http://svn.example.org/trunk/[[file]]?root=wiki&r1=[[r1]]&r2=[[r2]]", - #svnrepo => "/svn/wiki", #svnpath => "trunk", # Git stuff. @@ -40,12 +39,19 @@ use IkiWiki::Setup::Standard { # Mercurial stuff. #rcs => "mercurial", - #historyurl => "http://localhost:8000/", # hg serve'd local repository + #historyurl => "http://localhost:8000/log/tip/[[file]]", # hg serve'd local repository #diffurl => "http://localhost:8000/?fd=[[r2]];file=[[file]]", + # Bazaar stuff. + #rcs => "bzr", + #historyurl => "", + #diffurl => "http://example.com/revision?start_revid=[[r2]]#[[file]]-s", # using loggerhead + # Monotone stuff #rcs => "monotone", #mtnkey => "web\@machine.company.com", + #historyurl => "http://viewmtn.example.com/", + #diffurl => "http://viewmtn.example.com/revision/diff/[[r1]]/with/[[r2]]/[[file]]", # Set if you want the wiki to sync on update and commit. #mtnsync => 0, # The path to your workspace (defaults to the srcdir itself) @@ -72,8 +78,6 @@ use IkiWiki::Setup::Standard { # # what you want. # wrapper => "/svn/wikirepo/hooks/post-commit", # wrappermode => "04755", - # # Enable mail notifications of commits. - # notify => 1, # # Log to syslog since svn post-commit hooks # # hide output and errors. # syslog => 1, @@ -84,16 +88,17 @@ use IkiWiki::Setup::Standard { # # post-update hook script, which may not be # # what you want. # wrapper => "/git/wiki.git/hooks/post-update", - # wrappermode => "04755", - # # Enable mail notifications of commits. - # notify => 1, + # wrappermode => "06755", #}, ], - # Generate rss feeds for blogs? - rss => 1, - # Generate atom feeds for blogs? - atom => 1, + # Default to generating rss feeds for blogs? + #rss => 1, + # Default to generating atom feeds for blogs? + #atom => 1, + # Allow generating feeds even if not generated by default? + #allowrss => 1, + #allowatom => 1, # Urls to ping with XML-RPC when rss feeds are updated #pingurl => [qw{http://rpc.technorati.com/rpc/ping}], # Include discussion links on all pages? @@ -118,13 +123,18 @@ use IkiWiki::Setup::Standard { #usedirs => 0, # Simple spam prevention: require an account-creation password. #account_creation_password => "example", + # Uncomment to force ikiwiki to run with a particular umask. + #umask => 022, + # Default settings for the recentchanges page. + #recentchangespage => "recentchanges", + #recentchangesnum => 100, # To add plugins, list them here. #add_plugins => [qw{goodstuff search wikitext camelcase # htmltidy fortune sidebar map rst anonok}], # If you want to disable any of the default plugins, list them here. #disable_plugins => [qw{inline htmlscrubber passwordauth openid}], - # To add a directory to the perl searh path, use this. + # To add a directory to the perl search path, use this. #libdir => "/home/me/.ikiwiki/", # For use with the tag plugin, make all tags be located under a -- cgit v1.2.3 From 6517ad6ab9ff4dbbe0486b4af1c6bf3518f2e48b Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 22 Feb 2008 14:42:20 +0100 Subject: Use native git protocol (yeah - I finally made it work). --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index c010624..4050872 100644 --- a/README +++ b/README @@ -15,7 +15,7 @@ Getting the source This README file is available at http://source.jones.dk/ together with a GIT repository with source of the translation routines. Pull it like this: - git clone http://source.jones.dk/ikiwiki.git + git clone git://source.jones.dk/ikiwiki Installation @@ -56,7 +56,7 @@ once, not on subsequent pushes) - like this: To resyncronize an older fork of the repository with newer upstream changes, do like this (skip first command on subsequent updates): - git remote add ikiwiki http://source.jones.dk/ikiwiki.git + git remote add ikiwiki git://source.jones.dk/ikiwiki git pull ikiwiki master -- cgit v1.2.3 From 54bf1a8f8093cccf83f3b658ee33d7a63c44f2e2 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 22 Feb 2008 14:49:56 +0100 Subject: Use native git protocol - in Makefile too. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b622f62..5b65460 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SOURCES = ikiwiki -ikiwiki_ORIGIN = http://source.jones.dk/ikiwiki_MODULE.git +ikiwiki_ORIGIN = git://source.jones.dk/ikiwiki_MODULE ikiwiki_MODULES = templates basewiki smiley ikiwiki_POMODULES = smiley ikiwiki_BRANCH = master-LOCALE -- cgit v1.2.3 From 4e6b45a2af598fcaa27d0da915d68b8ea4797067 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 24 Feb 2008 16:50:37 +0100 Subject: Disable danish POLOCALES target for now: Invoking bare make on virgin clone on osx fails with Makefile:128: *** missing endif. Stop. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5b65460..e388f0b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ ikiwiki_MODULES = templates basewiki smiley ikiwiki_POMODULES = smiley ikiwiki_BRANCH = master-LOCALE ikiwiki_LOCALES = da -ikiwiki_POLOCALES = da +#ikiwiki_POLOCALES = da #dummy_MODULES = content_dummy -- cgit v1.2.3 From ba721853a6f276019eb7f8c5b4a31d3c11a7f836 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 25 Feb 2008 16:28:25 +0100 Subject: Add notes on forking a multi-branched repository. --- README | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README b/README index 4050872..3becd90 100644 --- a/README +++ b/README @@ -53,6 +53,16 @@ once, not on subsequent pushes) - like this: git config remote.origin.url git-reference-to-public-repository git push --all +To instead populate your newly created public repository with a multi-branched +local repository, first make a complete clone with all branches setup locally, +and push it all - like this for repository with master and master-da branches: + + git clone git-reference-to-old-public-repository some-temp-dir + cd some-temp-dir + git checkout -b master-da origin/master-da + git config remote.origin.url git-reference-to-public-repository + git push --all + To resyncronize an older fork of the repository with newer upstream changes, do like this (skip first command on subsequent updates): -- cgit v1.2.3