Bugzilla – Attachment 81158 Details for
Bug 15395
Internationalization: plural forms, context, and more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15395: Do not process template files that do not use i18n.inc
Bug-15395-Do-not-process-template-files-that-do-no.patch (text/plain), 1.37 KB, created by
Julian Maurice
on 2018-10-25 13:23:53 UTC
(
hide
)
Description:
Bug 15395: Do not process template files that do not use i18n.inc
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-10-25 13:23:53 UTC
Size:
1.37 KB
patch
obsolete
>From c53853cf426224437612e916e8cc33aa07bb7520 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 25 Oct 2018 15:04:46 +0200 >Subject: [PATCH] Bug 15395: Do not process template files that do not use > i18n.inc > >It should make the string extraction process a little faster > >For the record, I timed some parts of the process to see why it was so >slow, and without surprises the most time-consuming task is the Perl >code analysis by PPI with an average time of 50ms by "template block" on >my machine. >Multiply that by the number of template blocks (approximatively 900), >that gives us 45 seconds just for this task. >--- > misc/translator/LangInstaller.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index deff3abf2d..b8a6ee64ae 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -527,6 +527,10 @@ sub extract_messages_from_templates { > foreach my $file (@files) { > say "Extract messages from $file" if $self->{verbose}; > my $template = read_file("$intranetdir/$file"); >+ >+ # No need to process a file that doesn't use the i18n.inc file. >+ next unless $template =~ /i18n\.inc/; >+ > my $data = $parser->parse($template); > unless ($data) { > warn "Error at $file : " . $parser->error(); >-- >2.17.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 15395
:
45797
|
45798
|
45799
|
46337
|
50023
|
50024
|
50025
|
50026
|
61873
|
61874
|
61875
|
61876
|
61934
|
61935
|
61977
|
62008
|
62041
|
62326
|
62327
|
62328
|
62329
|
62330
|
62331
|
62332
|
62333
|
62335
|
62709
|
65894
|
70974
|
70975
|
70976
|
71940
|
71941
|
71942
|
71943
|
71944
|
71945
|
71946
|
71947
|
71948
|
71949
|
71950
|
71951
|
71952
|
73901
|
73902
|
73903
|
73904
|
73905
|
73906
|
73907
|
73908
|
73909
|
73910
|
73911
|
73912
|
73913
|
76328
|
76329
|
76330
|
77475
|
77476
|
81152
|
81153
|
81154
|
81155
|
81156
|
81157
|
81158
|
81159
|
81167
|
81734
|
81735
|
81736
|
81737
|
81738
|
81739
|
81741
|
81742
|
81743