Bugzilla – Attachment 28643 Details for
Bug 12061
tmpl_process3.pl new features
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12061 - tmpl_process3.pl - Remove obsoleted strings/backups
Bug-12061---tmplprocess3pl---Remove-obsoleted-stri.patch (text/plain), 3.08 KB, created by
Fridolin Somers
on 2014-06-03 09:02:52 UTC
(
hide
)
Description:
Bug 12061 - tmpl_process3.pl - Remove obsoleted strings/backups
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2014-06-03 09:02:52 UTC
Size:
3.08 KB
patch
obsolete
>From 1d7c6f972946603e52aa63c1f03efcf2eeef1f55 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sun, 6 Apr 2014 19:21:47 -0300 >Subject: [PATCH] Bug 12061 - tmpl_process3.pl - Remove obsoleted > strings/backups > >This patch modifies the update process for PO files, >removing obsoleted strings. Currently they are removed >manually as part of the standar procedure of strings update. >Also backup files (*~) need to be removed manually. > >To test: >1. Update translation files for any language, ej. fi-FI >(cd misc/translation; perl translate update fi-FI) > >2. Check existence of obsoleted strings >egrep "#~ msg" misc/translator/po/fi-FI-* > >3. Check existence of backup files >ls misc/translator/po/fi-FI-*~ > >4. Reset to HEAD and clean > >5. Apply the patch > >6. Update again, check there are no more obsoleted >strings nor backup files > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > misc/translator/tmpl_process3.pl | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl >index eea5f3e..1690306 100755 >--- a/misc/translator/tmpl_process3.pl >+++ b/misc/translator/tmpl_process3.pl >@@ -348,7 +348,7 @@ if ($action eq 'create') { > close INPUT; > close OUTPUT; > } >- $st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile2"); >+ $st = system("msgmerge ".($quiet?'-q':'')." -s $str_file $tmpfile2 -o - | msgattrib --no-obsolete -o $str_file"); > } else { > error_normal "Text extraction failed: $xgettext: $!\n", undef; > error_additional "Will not run msgmerge\n", undef; >@@ -377,10 +377,10 @@ if ($action eq 'create') { > if ( @filenames ) { > my ($tmph3, $tmpfile3) = tmpnam(); > $st = system("msgcat $str_file $tmpfile2 > $tmpfile3"); >- $st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile3") >+ $st = system("msgmerge ".($quiet?'-q':'')." -s $str_file $tmpfile3 -o - | msgattrib --no-obsolete -o $str_file") > unless $st; > } else { >- $st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile2"); >+ $st = system("msgmerge ".($quiet?'-q':'')." -s $str_file $tmpfile2 -o - | msgattrib --no-obsolete -o $str_file"); > } > } else { > error_normal "Text extraction failed: $xgettext: $!\n", undef; >@@ -527,13 +527,13 @@ Anchors are represented by an <AI<n>> notation. > The meaning of this non-standard notation might not be obvious. > > The create action calls xgettext.pl to do the actual work; >-the update action calls xgettext.pl and msgmerge(1) to do the >-actual work. >+the update action calls xgettext.pl, msgmerge(1) and msgattrib(1) >+to do the actual work. > > =head1 BUGS > >-xgettext.pl must be present in the current directory; the >-msgmerge(1) command must also be present in the search path. >+xgettext.pl must be present in the current directory; both >+msgmerge(1) and msgattrib(1) must also be present in the search path. > The script currently does not check carefully whether these > dependent commands are present. > >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12061
:
26943
|
26944
|
26945
|
28443
|
28444
|
28445
|
28450
|
28451
|
28643
|
28644
|
28645
|
28735
|
28736
|
28737
|
30148
|
30966