diff options
author | Filip Komar <filip@mageia.org> | 2013-06-21 17:42:08 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2013-06-21 17:42:08 +0000 |
commit | d26238f2b98625ba784b4865f21767adcc1b8e85 (patch) | |
tree | fc4a55b0965db3df8ee1af873f495772941e6784 | |
parent | 72ca7f736e3d6789896e22aaad2da30946a050be (diff) | |
download | www-d26238f2b98625ba784b4865f21767adcc1b8e85.tar www-d26238f2b98625ba784b4865f21767adcc1b8e85.tar.gz www-d26238f2b98625ba784b4865f21767adcc1b8e85.tar.bz2 www-d26238f2b98625ba784b4865f21767adcc1b8e85.tar.xz www-d26238f2b98625ba784b4865f21767adcc1b8e85.zip |
missing strings replaced by en + small fixes
-rw-r--r-- | en/about/license/index.php | 47 | ||||
-rw-r--r-- | en/about/license/php-mo.php | 2 |
2 files changed, 27 insertions, 22 deletions
diff --git a/en/about/license/index.php b/en/about/license/index.php index f7add6425..86e86d66a 100644 --- a/en/about/license/index.php +++ b/en/about/license/index.php @@ -9,13 +9,13 @@ require('php-mo.php'); if($locale == 'en') { // this can be done better maybe with preg_replace strtoupper combo $po_locale = 'libDrakX.pot'; -} else if($locale == 'pa_in') { +} else if($locale == 'pa-in') { $po_locale = 'pa_IN.po'; -} else if($locale == 'pt_br') { +} else if($locale == 'pt-br') { $po_locale = 'pt_BR.po'; -} else if($locale == 'zh_cn') { +} else if($locale == 'zh-cn') { $po_locale = 'zh_CN.po'; -} else if($locale == 'zh_tw') { +} else if($locale == 'zh-tw') { $po_locale = 'zh_TW.po'; } else { $po_locale = "$locale.po"; @@ -36,22 +36,21 @@ if($po_file === false) { } //var_dump($po_file); // qq debug -$license_strings = array(); - -$license_strings[] = array('_: You can warn about unofficial translation here'); -$license_strings[] = array('The operating system and the different components available in the Mageia distribution \nshall be called the \"Software Products\" hereafter. The Software Products include, but are not \nrestricted to, the set of programs, methods, rules and documentation related to the operating \nsystem and the different components of the Mageia distribution, and any applications \ndistributed with these products provided by Mageia\'s licensors or suppliers.'); -$license_strings[] = array('1. License Agreement', 'h3'); -$license_strings[] = array('Please read this document carefully. This document is a license agreement between you and \nMageia which applies to the Software Products.\nBy installing, duplicating or using any of the Software Products in any manner, you explicitly \naccept and fully agree to conform to the terms and conditions of this License. \nIf you disagree with any portion of the License, you are not allowed to install, duplicate or use \nthe Software Products. \nAny attempt to install, duplicate or use the Software Products in a manner which does not comply \nwith the terms and conditions of this License is void and will terminate your rights under this \nLicense. Upon termination of the License, you must immediately destroy all copies of the \nSoftware Products.'); -$license_strings[] = array('2. Limited Warranty', 'h3'); -$license_strings[] = array('The Software Products and attached documentation are provided \"as is\", with no warranty, to the \nextent permitted by law.\nNeither Mageia nor its licensors or suppliers will, in any circumstances and to the extent \npermitted by law, be liable for any special, incidental, direct or indirect damages whatsoever \n(including without limitation damages for loss of business, interruption of business, financial \nloss, legal fees and penalties resulting from a court judgment, or any other consequential loss) \narising out of the use or inability to use the Software Products, even if Mageia or its \nlicensors or suppliers have been advised of the possibility or occurrence of such damages.\n\nLIMITED LIABILITY LINKED TO POSSESSING OR USING PROHIBITED SOFTWARE IN SOME COUNTRIES\n\nTo the extent permitted by law, neither Mageia nor its licensors, suppliers or\ndistributors will, in any circumstances, be liable for any special, incidental, direct or indirect \ndamages whatsoever (including without limitation damages for loss of business, interruption of \nbusiness, financial loss, legal fees and penalties resulting from a court judgment, or any \nother consequential loss) arising out of the possession and use of software components or \narising out of downloading software components from one of Mageia sites which are \nprohibited or restricted in some countries by local laws.\nThis limited liability applies to, but is not restricted to, the strong cryptography components \nincluded in the Software Products.\nHowever, because some jurisdictions do not allow the exclusion or limitation or liability for \nconsequential or incidental damages, the above limitation may not apply to you.'); -$license_strings[] = array('3. The GPL License and Related Licenses', 'h3'); -$license_strings[] = array('The Software Products consist of components created by different persons or entities.\nMost of these licenses allow you to use, duplicate, adapt or redistribute the components which \nthey cover. Please read carefully the terms and conditions of the license agreement for each component \nbefore using any component. Any question on a component license should be addressed to the component \nlicensor or supplier and not to Mageia.\nThe programs developed by Mageia are governed by the GPL License. Documentation written \nby Mageia is governed by \"%s\" License.', null, 'CC-By-SA'); // "CC-By-SA" http://svnweb.mageia.org/soft/drakx/trunk/perl-install/messages.pm?revision=5942&view=markup -$license_strings[] = array('4. Intellectual Property Rights', 'h3'); -$license_strings[] = array('All rights to the components of the Software Products belong to their respective authors and are \nprotected by intellectual property and copyright laws applicable to software programs.\nMageia and its suppliers and licensors reserves their rights to modify or adapt the Software \nProducts, as a whole or in parts, by all means and for all purposes.\n\"Mageia\" and associated logos are trademarks of %s', null, 'Mageia.Org'); // "Mageia.Org" http://svnweb.mageia.org/soft/drakx/trunk/perl-install/messages.pm?revision=5942&view=markup -$license_strings[] = array('5. Governing Laws', 'h3'); -$license_strings[] = array('If any portion of this agreement is held void, illegal or inapplicable by a court judgment, this \nportion is excluded from this contract. You remain bound by the other applicable sections of the \nagreement.\nThe terms and conditions of this License are governed by the Laws of France.\nAll disputes on the terms of this license will preferably be settled out of court. As a last \nresort, the dispute will be referred to the appropriate Courts of Law of Paris - France.\nFor any question on this document, please contact Mageia.'); -$license_strings[] = array('Warning: Free Software may not necessarily be patent free, and some Free\nSoftware included may be covered by patents in your country. For example, the\nMP3 decoders included may require a license for further usage (see\nhttp://www.mp3licensing.com for more details). If you are unsure if a patent\nmay be applicable to you, check your local laws.'); - +$license_strings = array( + array('_: You can warn about unofficial translation here'), + array('The operating system and the different components available in the Mageia distribution \nshall be called the \"Software Products\" hereafter. The Software Products include, but are not \nrestricted to, the set of programs, methods, rules and documentation related to the operating \nsystem and the different components of the Mageia distribution, and any applications \ndistributed with these products provided by Mageia\'s licensors or suppliers.'), + array('1. License Agreement', 'h3'), + array('Please read this document carefully. This document is a license agreement between you and \nMageia which applies to the Software Products.\nBy installing, duplicating or using any of the Software Products in any manner, you explicitly \naccept and fully agree to conform to the terms and conditions of this License. \nIf you disagree with any portion of the License, you are not allowed to install, duplicate or use \nthe Software Products. \nAny attempt to install, duplicate or use the Software Products in a manner which does not comply \nwith the terms and conditions of this License is void and will terminate your rights under this \nLicense. Upon termination of the License, you must immediately destroy all copies of the \nSoftware Products.'), + array('2. Limited Warranty', 'h3'), + array('The Software Products and attached documentation are provided \"as is\", with no warranty, to the \nextent permitted by law.\nNeither Mageia nor its licensors or suppliers will, in any circumstances and to the extent \npermitted by law, be liable for any special, incidental, direct or indirect damages whatsoever \n(including without limitation damages for loss of business, interruption of business, financial \nloss, legal fees and penalties resulting from a court judgment, or any other consequential loss) \narising out of the use or inability to use the Software Products, even if Mageia or its \nlicensors or suppliers have been advised of the possibility or occurrence of such damages.\n\nLIMITED LIABILITY LINKED TO POSSESSING OR USING PROHIBITED SOFTWARE IN SOME COUNTRIES\n\nTo the extent permitted by law, neither Mageia nor its licensors, suppliers or\ndistributors will, in any circumstances, be liable for any special, incidental, direct or indirect \ndamages whatsoever (including without limitation damages for loss of business, interruption of \nbusiness, financial loss, legal fees and penalties resulting from a court judgment, or any \nother consequential loss) arising out of the possession and use of software components or \narising out of downloading software components from one of Mageia sites which are \nprohibited or restricted in some countries by local laws.\nThis limited liability applies to, but is not restricted to, the strong cryptography components \nincluded in the Software Products.\nHowever, because some jurisdictions do not allow the exclusion or limitation or liability for \nconsequential or incidental damages, the above limitation may not apply to you.'), + array('3. The GPL License and Related Licenses', 'h3'), + array('The Software Products consist of components created by different persons or entities.\nMost of these licenses allow you to use, duplicate, adapt or redistribute the components which \nthey cover. Please read carefully the terms and conditions of the license agreement for each component \nbefore using any component. Any question on a component license should be addressed to the component \nlicensor or supplier and not to Mageia.\nThe programs developed by Mageia are governed by the GPL License. Documentation written \nby Mageia is governed by \"%s\" License.', null, 'CC-By-SA'), // "CC-By-SA" http://svnweb.mageia.org/soft/drakx/trunk/perl-install/messages.pm?revision=5942&view=markup + array('4. Intellectual Property Rights', 'h3'), + array('All rights to the components of the Software Products belong to their respective authors and are \nprotected by intellectual property and copyright laws applicable to software programs.\nMageia and its suppliers and licensors reserves their rights to modify or adapt the Software \nProducts, as a whole or in parts, by all means and for all purposes.\n\"Mageia\" and associated logos are trademarks of %s', null, 'Mageia.Org'), // "Mageia.Org" http://svnweb.mageia.org/soft/drakx/trunk/perl-install/messages.pm?revision=5942&view=markup + array('5. Governing Laws', 'h3'), + array('If any portion of this agreement is held void, illegal or inapplicable by a court judgment, this \nportion is excluded from this contract. You remain bound by the other applicable sections of the \nagreement.\nThe terms and conditions of this License are governed by the Laws of France.\nAll disputes on the terms of this license will preferably be settled out of court. As a last \nresort, the dispute will be referred to the appropriate Courts of Law of Paris - France.\nFor any question on this document, please contact Mageia.'), + array('Warning: Free Software may not necessarily be patent free, and some Free\nSoftware included may be covered by patents in your country. For example, the\nMP3 decoders included may require a license for further usage (see\nhttp://www.mp3licensing.com for more details). If you are unsure if a patent\nmay be applicable to you, check your local laws.'), +); ?> <!DOCTYPE html> <html lang="<?php echo $locale; ?>"> @@ -80,7 +79,13 @@ $license_strings[] = array('Warning: Free Software may not necessarily be patent $search = array('\\"','\n\n', '\n', ' '); $replace = array('"','<br>', ' ', ' '); foreach($license_strings as $value) { - $license_string = str_replace('%s', (isset($value[2]) ? $value[2] : ''), ((isset($po_file[$value[0]]["msgstr"][0]) && $locale != 'en') ? $po_file[$value[0]]["msgstr"][0] : $value[0])); + if(isset($po_file[$value[0]]["msgstr"][0])) { + $license_string = $po_file[$value[0]]["msgstr"][0]; + } + if($license_string == '') { + $license_string = $value[0]; + } + $license_string = str_replace('%s', (isset($value[2]) ? $value[2] : ''), $license_string); echo '<' . (isset($value[1]) ? $value[1] : 'p') . '>' . str_replace($search, $replace, $license_string) . '</' . (isset($value[1]) ? $value[1] : 'p') . '>'; } ?> diff --git a/en/about/license/php-mo.php b/en/about/license/php-mo.php index 616440735..4d5489ca2 100644 --- a/en/about/license/php-mo.php +++ b/en/about/license/php-mo.php @@ -56,7 +56,7 @@ function phpmo_clean_helper($x) { /* @link http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files */ function phpmo_parse_po_file($in) { // read .po file - $fh = fopen($in, 'r'); + $fh = @fopen($in, 'r'); if ($fh === false) { // Could not open file resource return false; |