aboutsummaryrefslogtreecommitdiffstats
path: root/en
diff options
context:
space:
mode:
Diffstat (limited to 'en')
-rw-r--r--en/about/license/index.php71
-rw-r--r--en/about/license/license.php57
-rw-r--r--en/about/license/php-mo.php87
-rw-r--r--en/community/index.php2
-rw-r--r--en/contribute/index.php4
-rw-r--r--en/map/index.php3
6 files changed, 82 insertions, 142 deletions
diff --git a/en/about/license/index.php b/en/about/license/index.php
index a530336fb..4dba6b3df 100644
--- a/en/about/license/index.php
+++ b/en/about/license/index.php
@@ -5,45 +5,10 @@ require '../../../langs.php';
_lang_load($locale, 'about/license');
-require('php-mo.php');
+require('license.php');
+$prepared_license_strings = read_license_from_vcs($locale);
-if($locale == 'en') {
- $po_locale = 'libDrakX.pot';
-} else {
- preg_match("/(..)(-)(..)/", $locale, $parsed_locale);
- if(isset($parsed_locale[3])) { // create pt_BR.po from pt-br and alike
- $po_locale = $parsed_locale[1] . '_' . strtoupper($parsed_locale[3]) . '.po';
- } else {
- $po_locale = $locale . '.po';
- }
-}
-
-//$po_files_path = "../../../../drakx_share/"; // qq debug
-//$po_files_end = ""; // qq debug
-$po_files_path = "http://svnweb.mageia.org/soft/drakx/trunk/perl-install/share/po/";
-$po_files_end = "?view=co";
-
-$po_file = phpmo_parse_po_file($po_files_path . $po_locale . $po_files_end);
-if($po_file === false) {
- $po_file = phpmo_parse_po_file($po_files_path . "libDrakX.pot" . $po_files_end);
-}
-
-$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.'),
-);
-if($locale == 'en') { array_shift($license_strings); }
+// Note to translators: _t('Note to translators! PLEASE READ THIS LINE! YOU DON\'T NEED TO TRANSLATE IT! Please translate license in file "http://svnweb.mageia.org/soft/drakx/trunk/perl-install/share/po/" first. Check wiki for details.')
?>
<!DOCTYPE html>
<html lang="<?php echo $locale; ?>">
@@ -65,25 +30,23 @@ if($locale == 'en') { array_shift($license_strings); }
<section>
<?php
echo '<div id="preamble">';
- _h('An introduction text ... (summarizing, explaining the core principles, and why this license was chosen).');
- echo '<p>' . sprintf(_t('See also %swiki page about licensing policy</a>.'),
- '<a href="https://wiki.mageia.org/en/Licensing_policy">') . '</p></div><br>';
+ // _('An introduction text ... (summarizing, explaining the core principles, and why this license was chosen).');
+ echo '<p>' . sprintf(_t('You can get more information about our licensing policy %shere</a>.'),
+ '<a href="https://wiki.mageia.org/en/Licensing_policy">') . '</p>';
+ $unofficial_translation = array_shift($prepared_license_strings);
+ $patents_warning = array_pop($prepared_license_strings);
+ if($locale != 'en') { echo sprintf('<%s>' . $unofficial_translation[0] . '</%s>' . PHP_EOL, $unofficial_translation[1], $unofficial_translation[1]); }
+ echo '</div><br>';
+
_h('Mageia license', null, 'h2');
- $search = array('\\"', '\n', ' ');
- $replace = array('"','<br>', ' ');
- foreach($license_strings as $value) {
- $license_string = '';
- 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') . '>';
+ foreach($prepared_license_strings as $string) {
+ echo sprintf('<%s>' . $string[0] . '</%s>' . PHP_EOL, $string[1], $string[1]);
}
- ?>
+ _h('Warning about patents', null, 'h2');
+ $patents = str_replace('http://www.mp3licensing.com', '<a href="http://www.mp3licensing.com">www.mp3licensing.com</a>', $patents_warning[0]);
+ echo '<p>' . $patents . '</p>' . PHP_EOL;
+ ?>
</section>
</div>
</div>
diff --git a/en/about/license/license.php b/en/about/license/license.php
new file mode 100644
index 000000000..720a0ebdc
--- /dev/null
+++ b/en/about/license/license.php
@@ -0,0 +1,57 @@
+<?php
+function read_license_from_vcs($locale) {
+ $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.'),
+ );
+
+ require_once('php-mo.php');
+
+ if($locale == 'en') {
+ $po_locale = 'libDrakX.pot';
+ } else {
+ preg_match("/(..)(-)(..)/", $locale, $parsed_locale);
+ if(isset($parsed_locale[3])) { // create pt_BR.po from pt-br and alike
+ $po_locale = $parsed_locale[1] . '_' . strtoupper($parsed_locale[3]) . '.po';
+ } else {
+ $po_locale = $locale . '.po';
+ }
+ }
+ $po_files_path = "http://svnweb.mageia.org/soft/drakx/trunk/perl-install/share/po/";
+ $po_files_end = "?view=co";
+
+ $po_file = phpmo_parse_po_file($po_files_path . $po_locale . $po_files_end);
+ if($po_file === false) {
+ $po_file = phpmo_parse_po_file($po_files_path . "libDrakX.pot" . $po_files_end);
+ }
+
+ $num_of_untranslated_sentences = 0;
+ $num_of_sentences_for_translation = 0;
+ $search = array('\\"', '\n', ' ');
+ $replace = array('"','<br>', ' ');
+ foreach($license_strings as $value) {
+ str_replace(array(".", "_"), array(".", "_"), $value[0], $count);
+ $num_of_sentences_for_translation += $count;
+ if(!empty($po_file[$value[0]]["msgstr"][0]) && $po_file[$value[0]]["msgstr"][0] != $value[0]) {
+ $license_string = $po_file[$value[0]]["msgstr"][0];
+ } else {
+ $num_of_untranslated_sentences += $count;
+ $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);
+ }
+
+ return $prepared_license_strings;
+}
diff --git a/en/about/license/php-mo.php b/en/about/license/php-mo.php
index 6e2159a25..470ce80e8 100644
--- a/en/about/license/php-mo.php
+++ b/en/about/license/php-mo.php
@@ -1,6 +1,9 @@
<?php
/**
- * php.mo 0.1 by Joss Crowcroft (http://www.josscrowcroft.com)
+ * based on php.mo 0.1 by Joss Crowcroft (http://www.josscrowcroft.com)
+ * added case for commented unused string
+ * fixed "fuzzy flag first line" bug which didn't saved previous proper string at all
+ * removed unedeed phpmo_convert and phpmo_write_mo_file
*
* Converts gettext translation '.po' files to binary '.mo' files in PHP.
*
@@ -22,22 +25,6 @@
* License: GPL v3 http://www.opensource.org/licenses/gpl-3.0.html
*/
-/**
- * The main .po to .mo function
- */
-function phpmo_convert($input, $output = false) {
- if ( !$output )
- $output = str_replace( '.po', '.mo', $input );
-
- $hash = phpmo_parse_po_file( $input );
- if ( $hash === false ) {
- return false;
- } else {
- phpmo_write_mo_file( $hash, $output );
- return true;
- }
-}
-
function phpmo_clean_helper($x) {
if (is_array($x)) {
foreach ($x as $k => $v) {
@@ -164,70 +151,4 @@ function phpmo_parse_po_file($in) {
return $hash;
}
-/* Write a GNU gettext style machine object. */
-/* @link http://www.gnu.org/software/gettext/manual/gettext.html#MO-Files */
-function phpmo_write_mo_file($hash, $out) {
- // sort by msgid
- ksort($hash, SORT_STRING);
- // our mo file data
- $mo = '';
- // header data
- $offsets = array ();
- $ids = '';
- $strings = '';
-
- foreach ($hash as $entry) {
- $id = $entry['msgid'];
- if (isset ($entry['msgid_plural']))
- $id .= "\x00" . $entry['msgid_plural'];
- // context is merged into id, separated by EOT (\x04)
- if (array_key_exists('msgctxt', $entry))
- $id = $entry['msgctxt'] . "\x04" . $id;
- // plural msgstrs are NUL-separated
- $str = implode("\x00", $entry['msgstr']);
- // keep track of offsets
- $offsets[] = array (
- strlen($ids
- ), strlen($id), strlen($strings), strlen($str));
- // plural msgids are not stored (?)
- $ids .= $id . "\x00";
- $strings .= $str . "\x00";
- }
-
- // keys start after the header (7 words) + index tables ($#hash * 4 words)
- $key_start = 7 * 4 + sizeof($hash) * 4 * 4;
- // values start right after the keys
- $value_start = $key_start +strlen($ids);
- // first all key offsets, then all value offsets
- $key_offsets = array ();
- $value_offsets = array ();
- // calculate
- foreach ($offsets as $v) {
- list ($o1, $l1, $o2, $l2) = $v;
- $key_offsets[] = $l1;
- $key_offsets[] = $o1 + $key_start;
- $value_offsets[] = $l2;
- $value_offsets[] = $o2 + $value_start;
- }
- $offsets = array_merge($key_offsets, $value_offsets);
-
- // write header
- $mo .= pack('Iiiiiii', 0x950412de, // magic number
- 0, // version
- sizeof($hash), // number of entries in the catalog
- 7 * 4, // key index offset
- 7 * 4 + sizeof($hash) * 8, // value index offset,
- 0, // hashtable size (unused, thus 0)
- $key_start // hashtable offset
- );
- // offsets
- foreach ($offsets as $offset)
- $mo .= pack('i', $offset);
- // ids
- $mo .= $ids;
- // strings
- $mo .= $strings;
-
- file_put_contents($out, $mo);
-}
?> \ No newline at end of file
diff --git a/en/community/index.php b/en/community/index.php
index 3f0bb5b20..a79ff48e4 100644
--- a/en/community/index.php
+++ b/en/community/index.php
@@ -38,7 +38,7 @@ include '../../lib/news.php';
<li><a href="http://ml.mageia.org/"><?php _e('Mailing-lists');?></a></li>
<li><a href="<?php _e('http://wiki.mageia.org/')?>">Wiki</a></li>
<li><a href="https://bugs.mageia.org/">Bugzilla</a></li>
- <li><a href="http://people.mageia.org/">People</a></li>
+ <li><a href="http://people.mageia.org/"><?php _e('People');?></a></li>
</ul>
</header>
<div class="para" style="width: 400px;">
diff --git a/en/contribute/index.php b/en/contribute/index.php
index 43660bcc5..c0c62c061 100644
--- a/en/contribute/index.php
+++ b/en/contribute/index.php
@@ -35,7 +35,7 @@ _lang_load($locale, 'contribute');
<li>
<h3><?php _e('A few minutes')?></h3>
<ul class="contrib-act">
- <li><?php _e('Stop by the <a href="http://forums.mageia.org/">forums</a> support section and check if you can answer a question.')?></li>
+ <li><?php _e('Stop by the <a href="https://forums.mageia.org/">forums</a> support section and check if you can answer a question.')?></li>
<li><?php _e('Talk about the project to people around you, on your blog, your Twitter account, at your work place.')?></li>
<li><?php _e('If you encounter a bug you can reproduce consistently, <a href="http://bugs.mageia.org/">submit a bug report</a>.')?></li>
<li><?php _e('Make a <a href="../donate/">donation</a>!')?></li>
@@ -64,7 +64,7 @@ _lang_load($locale, 'contribute');
<ul id="contrib-roles" class="contrib-list">
<li id="support">
<h3><?php _e('Helping users &amp; advocating the project')?></h3>
- <p><?php _e('Want to welcome and help new users or share tips with experienced ones? In <a href="https://wiki.mageia.org/en/IRC">IRC channels</a>, <a href="http://forums.mageia.org/">forums</a>, <a href="https://wiki.mageia.org/en/Mailing_lists">mailing-lists</a>, local events? Just get in touch with us via one of these channels and share the fun!')?></p>
+ <p><?php _e('Want to welcome and help new users or share tips with experienced ones? In <a href="https://wiki.mageia.org/en/IRC">IRC channels</a>, <a href="https://forums.mageia.org/">forums</a>, <a href="https://wiki.mageia.org/en/Mailing_lists">mailing-lists</a>, local events? Just get in touch with us via one of these channels and share the fun!')?></p>
</li>
<li id="docu">
<h3><a href="https://wiki.mageia.org/en/Documentation_team"><?php _e('Writing, copywriting and documenting')?></a></h3>
diff --git a/en/map/index.php b/en/map/index.php
index 547fed828..3918f4049 100644
--- a/en/map/index.php
+++ b/en/map/index.php
@@ -30,6 +30,7 @@ $map = array(
array('t' => _t('Reports'), 'l' => '/{L}/about/reports/')
)
),
+ array('t' => _t('License'), 'l' => '/{L}/about/license/'),
array('t' => _t('Timeline'), 'l' => '/{L}/timeline/'),
array('t' => _t('Financial Infos'), 'l' => '//treasurer.mageia.org/'),
)
@@ -70,7 +71,6 @@ $map = array(
array('t' => 'Wiki', 'l' => 'https://wiki.mageia.org/'),
array('t' => 'Bugzilla', 'l' => 'https://bugs.mageia.org/'),
array('t' => 'People', 'l' => 'http://people.mageia.org/'),
-
)
),
'contribute' => array(
@@ -97,7 +97,6 @@ $t_li3 = '<li><a href="%s">%s</a></li> ';
$sMap = '<ul id="map">';
foreach ($map as $k => $v) {
-
$l = '';
foreach ($v['i'] as $w) {
$sub = null;