Mageia Bugzilla – Attachment 9681 Details for
Bug 21760
Web/www: Unexpected string about unofficial translation in /about/license
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch
0001-Don-t-show-_-You-can-warn-about-unofficial-translati.patch (text/plain), 1.53 KB, created by
Masanori Kakura
on 2017-09-23 09:25:07 CEST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Masanori Kakura
Created:
2017-09-23 09:25:07 CEST
Size:
1.53 KB
patch
obsolete
>From 286a147c3d6eb02643d72a5fa1264633ea16fdc2 Mon Sep 17 00:00:00 2001 >From: Masanori Kakura <kakurasan@gmail.com> >Date: Sat, 23 Sep 2017 16:08:36 +0900 >Subject: [PATCH] Don't show "_: You can warn about unofficial translation > here" if empty > >--- > en/about/license/license.php | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/en/about/license/license.php b/en/about/license/license.php >index eebf1163..02e90896 100644 >--- a/en/about/license/license.php >+++ b/en/about/license/license.php >@@ -43,9 +43,11 @@ function read_license_from_vcs($locale) { > if(!empty($po_file[$value[0]][0][0]) && trim($po_file[$value[0]][0][0]) != "" && $po_file[$value[0]][0][0] != $value[0]) { > $license_string = $po_file[$value[0]][0][0]; > } else { >- $num_of_untranslated_sentences += $count; >- $untranslated_sentences[] = $value[0]; >- $license_string = $value[0]; >+ if($value[0] != $license_strings[0][0]) { >+ $num_of_untranslated_sentences += $count; >+ $untranslated_sentences[] = $value[0]; >+ $license_string = $value[0]; >+ } > } > $license_string = str_replace('%s', (isset($value[2]) ? $value[2] : ''), $license_string); > $prepared_license_strings[] = array(str_replace($search, $replace, $license_string), (isset($value[1]) ? $value[1] : 'p'), 'untran' => $num_of_untranslated_sentences, 'all' => $num_of_sentences_for_translation, 'untranslated_sentences' => $untranslated_sentences); >-- >2.11.0 >
From 286a147c3d6eb02643d72a5fa1264633ea16fdc2 Mon Sep 17 00:00:00 2001 From: Masanori Kakura <kakurasan@gmail.com> Date: Sat, 23 Sep 2017 16:08:36 +0900 Subject: [PATCH] Don't show "_: You can warn about unofficial translation here" if empty --- en/about/license/license.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/en/about/license/license.php b/en/about/license/license.php index eebf1163..02e90896 100644 --- a/en/about/license/license.php +++ b/en/about/license/license.php @@ -43,9 +43,11 @@ function read_license_from_vcs($locale) { if(!empty($po_file[$value[0]][0][0]) && trim($po_file[$value[0]][0][0]) != "" && $po_file[$value[0]][0][0] != $value[0]) { $license_string = $po_file[$value[0]][0][0]; } else { - $num_of_untranslated_sentences += $count; - $untranslated_sentences[] = $value[0]; - $license_string = $value[0]; + if($value[0] != $license_strings[0][0]) { + $num_of_untranslated_sentences += $count; + $untranslated_sentences[] = $value[0]; + $license_string = $value[0]; + } } $license_string = str_replace('%s', (isset($value[2]) ? $value[2] : ''), $license_string); $prepared_license_strings[] = array(str_replace($search, $replace, $license_string), (isset($value[1]) ? $value[1] : 'p'), 'untran' => $num_of_untranslated_sentences, 'all' => $num_of_sentences_for_translation, 'untranslated_sentences' => $untranslated_sentences); -- 2.11.0
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 21760
: 9681