| Index: trunk/extensions/ParserFunctions/convertTests.txt |
| — | — | @@ -3,7 +3,7 @@ |
| 4 | 4 | !! input |
| 5 | 5 | {{#convert: 10 m | km }} |
| 6 | 6 | !!result |
| 7 | | -<p>0.01 kilometres |
| | 7 | +<p>0.01 kilometers |
| 8 | 8 | </p> |
| 9 | 9 | !! end |
| 10 | 10 | |
| — | — | @@ -19,14 +19,14 @@ |
| 20 | 20 | *{{#convert: 10.0E2 km | m }} |
| 21 | 21 | *{{#convert: 10.0E2.5 km | m }} |
| 22 | 22 | !! result |
| 23 | | -<ul><li>0.01 kilometres |
| 24 | | -</li><li>0.01 kilometres |
| 25 | | -</li><li>10,000 metres |
| 26 | | -</li><li>10,000- metres |
| 27 | | -</li><li>1,000,000 metres |
| 28 | | -</li><li>100 metres |
| 29 | | -</li><li>1,000,000 metres |
| 30 | | -</li><li>1,000,000.5,000 metres |
| | 23 | +<ul><li>0.01 kilometers |
| | 24 | +</li><li>0.01 kilometers |
| | 25 | +</li><li>10,000 meters |
| | 26 | +</li><li>10,000- meters |
| | 27 | +</li><li>1,000,000 meters |
| | 28 | +</li><li>100 meters |
| | 29 | +</li><li>1,000,000 meters |
| | 30 | +</li><li>1,000,000.5,000 meters |
| 31 | 31 | </li></ul> |
| 32 | 32 | |
| 33 | 33 | !! end |
| — | — | @@ -46,17 +46,17 @@ |
| 47 | 47 | *{{#convert: 19 m | km }} |
| 48 | 48 | *{{#convert: 20 m | km }} |
| 49 | 49 | !! result |
| 50 | | -<ul><li>0.01 kilometres |
| 51 | | -</li><li>0.011 kilometres |
| 52 | | -</li><li>0.012 kilometres |
| 53 | | -</li><li>0.013 kilometres |
| 54 | | -</li><li>0.014 kilometres |
| 55 | | -</li><li>0.015 kilometres |
| 56 | | -</li><li>0.016 kilometres |
| 57 | | -</li><li>0.017 kilometres |
| 58 | | -</li><li>0.018 kilometres |
| 59 | | -</li><li>0.019 kilometres |
| 60 | | -</li><li>0.02 kilometres |
| | 50 | +<ul><li>0.01 kilometers |
| | 51 | +</li><li>0.011 kilometers |
| | 52 | +</li><li>0.012 kilometers |
| | 53 | +</li><li>0.013 kilometers |
| | 54 | +</li><li>0.014 kilometers |
| | 55 | +</li><li>0.015 kilometers |
| | 56 | +</li><li>0.016 kilometers |
| | 57 | +</li><li>0.017 kilometers |
| | 58 | +</li><li>0.018 kilometers |
| | 59 | +</li><li>0.019 kilometers |
| | 60 | +</li><li>0.02 kilometers |
| 61 | 61 | </li></ul> |
| 62 | 62 | |
| 63 | 63 | !! end |
| — | — | @@ -73,14 +73,14 @@ |
| 74 | 74 | *{{#convert: 10.6 m | km }} |
| 75 | 75 | *{{#convert: 10.7 m | km }} |
| 76 | 76 | !! result |
| 77 | | -<ul><li>0.0100 kilometres |
| 78 | | -</li><li>0.0101 kilometres |
| 79 | | -</li><li>0.0102 kilometres |
| 80 | | -</li><li>0.0103 kilometres |
| 81 | | -</li><li>0.0104 kilometres |
| 82 | | -</li><li>0.0105 kilometres |
| 83 | | -</li><li>0.0106 kilometres |
| 84 | | -</li><li>0.0107 kilometres |
| | 77 | +<ul><li>0.0100 kilometers |
| | 78 | +</li><li>0.0101 kilometers |
| | 79 | +</li><li>0.0102 kilometers |
| | 80 | +</li><li>0.0103 kilometers |
| | 81 | +</li><li>0.0104 kilometers |
| | 82 | +</li><li>0.0105 kilometers |
| | 83 | +</li><li>0.0106 kilometers |
| | 84 | +</li><li>0.0107 kilometers |
| 85 | 85 | </li></ul> |
| 86 | 86 | |
| 87 | 87 | !! end |
| — | — | @@ -90,7 +90,7 @@ |
| 91 | 91 | !! input |
| 92 | 92 | {{#convert: 25, 26, 27, 28, 29, and 30 km }} |
| 93 | 93 | !! result |
| 94 | | -<p>25,000, 26,000, 27,000, 28,000, 29,000, and 30,000 metres |
| | 94 | +<p>25,000, 26,000, 27,000, 28,000, 29,000, and 30,000 meters |
| 95 | 95 | </p> |
| 96 | 96 | !! end |
| 97 | 97 | |
| — | — | @@ -99,7 +99,7 @@ |
| 100 | 100 | !! input |
| 101 | 101 | {{#convert: 25, 26, 27, 28, 29, and 30 miles }} |
| 102 | 102 | !! result |
| 103 | | -<p>40,000, 42,000, 43,000, 45,000, 47,000, and 50,000 metres |
| | 103 | +<p>40,000, 42,000, 43,000, 45,000, 47,000, and 50,000 meters |
| 104 | 104 | </p> |
| 105 | 105 | !! end |
| 106 | 106 | |
| — | — | @@ -108,7 +108,7 @@ |
| 109 | 109 | !! input |
| 110 | 110 | {{#convert:35000, 35E3, 35.0E3, 350E2, 3.500E4, 35000E0, 350000E-1 m | km }} |
| 111 | 111 | !! result |
| 112 | | -<p>35, 35, 35.0, 35, 35.00, 35, 35 kilometres |
| | 112 | +<p>35, 35, 35.0, 35, 35.00, 35, 35 kilometers |
| 113 | 113 | </p> |
| 114 | 114 | !! end |
| 115 | 115 | |
| — | — | @@ -120,10 +120,10 @@ |
| 121 | 121 | *{{#convert: 25 | #sourceunit = km | #sourceunit = mm }} |
| 122 | 122 | *{{#convert: 25 | #sourceunit = km | cm }} |
| 123 | 123 | !! result |
| 124 | | -<ul><li>25,000 metres |
| 125 | | -</li><li>25,000 metres |
| 126 | | -</li><li>0.025 metres |
| 127 | | -</li><li>2,500,000 centimetres |
| | 124 | +<ul><li>25,000 meters |
| | 125 | +</li><li>25,000 meters |
| | 126 | +</li><li>0.025 meters |
| | 127 | +</li><li>2,500,000 centimeters |
| 128 | 128 | </li></ul> |
| 129 | 129 | |
| 130 | 130 | !! end |
| — | — | @@ -142,16 +142,16 @@ |
| 143 | 143 | *{{#convert: 1 mi | #sf = 5 }} |
| 144 | 144 | *{{#convert: 1 mi | #sf = -8 }} |
| 145 | 145 | !! result |
| 146 | | -<ul><li>1,609 metres |
| 147 | | -</li><li>1,609.3 metres |
| 148 | | -</li><li>1,600 metres |
| 149 | | -</li><li>1,609.344 metres |
| 150 | | -</li><li>0 metres |
| 151 | | -</li><li>2,000 metres |
| 152 | | -</li><li>2,000 metres |
| 153 | | -</li><li>1,610 metres |
| 154 | | -</li><li>1,609.3 metres |
| 155 | | -</li><li>2,000 metres |
| | 146 | +<ul><li>1,609 meters |
| | 147 | +</li><li>1,609.3 meters |
| | 148 | +</li><li>1,600 meters |
| | 149 | +</li><li>1,609.344 meters |
| | 150 | +</li><li>0 meters |
| | 151 | +</li><li>2,000 meters |
| | 152 | +</li><li>2,000 meters |
| | 153 | +</li><li>1,610 meters |
| | 154 | +</li><li>1,609.3 meters |
| | 155 | +</li><li>2,000 meters |
| 156 | 156 | </li></ul> |
| 157 | 157 | |
| 158 | 158 | !! end |
| — | — | @@ -186,8 +186,26 @@ |
| 187 | 187 | *{{#convert: 25 km | #targetunit = #sourceunit }} |
| 188 | 188 | *{{#convert: 25 km | #sourceunit = #targetunit }} |
| 189 | 189 | !! result |
| 190 | | -<ul><li>25 kilometres |
| 191 | | -</li><li>25 kilometres |
| | 190 | +<ul><li>25 kilometers |
| | 191 | +</li><li>25 kilometers |
| 192 | 192 | </li></ul> |
| 193 | 193 | |
| 194 | 194 | !! end |
| | 195 | + |
| | 196 | +!! test |
| | 197 | +#language |
| | 198 | +!! input |
| | 199 | +*{{#convert: 10 m | km | #language=en-gb }} |
| | 200 | +*{{#convert: 10m | km | #language = en-gb }} |
| | 201 | +*{{#convert: 10 km | m |#language=en-gb}} |
| | 202 | +*{{#convert: 10 pa | mmhg | #language = en-gb }} |
| | 203 | +*{{#convert: 10 pa | mmhg | #language = /../evil/attack }} |
| | 204 | +!! result |
| | 205 | +<ul><li>0.01 kilometres |
| | 206 | +</li><li>0.01 kilometres |
| | 207 | +</li><li>10,000 metres |
| | 208 | +</li><li>0.1 milimetres of mercury |
| | 209 | +</li><li>0.1 milimeters of mercury |
| | 210 | +</li></ul> |
| | 211 | + |
| | 212 | +!! end |
| Index: trunk/extensions/ParserFunctions/Convert.php |
| — | — | @@ -38,6 +38,10 @@ |
| 39 | 39 | protected $decimalPlaces; |
| 40 | 40 | protected $significantFigures; |
| 41 | 41 | |
| | 42 | + # What language to display the units in |
| | 43 | + # @var Language |
| | 44 | + protected $language; |
| | 45 | + |
| 42 | 46 | # The last value converted, which will be used for PLURAL evaluation |
| 43 | 47 | protected $lastValue; |
| 44 | 48 | |
| — | — | @@ -56,6 +60,8 @@ |
| 57 | 61 | = $this->significantFigures |
| 58 | 62 | = $this->decimalPlaces |
| 59 | 63 | = null; |
| | 64 | + |
| | 65 | + $this->language = true; # prompts wfGetLangObj() to use $wgContLang |
| 60 | 66 | } |
| 61 | 67 | |
| 62 | 68 | /** |
| — | — | @@ -83,6 +89,7 @@ |
| 84 | 90 | 'significantfigures' => null, |
| 85 | 91 | 'abbreviate' => null, |
| 86 | 92 | 'rawsuffix' => null, |
| | 93 | + 'language' => null, |
| 87 | 94 | ); |
| 88 | 95 | if( !is_object( $magicWords ) ){ |
| 89 | 96 | foreach( $magicWords as $key => &$val ){ |
| — | — | @@ -120,6 +127,10 @@ |
| 121 | 128 | if( intval( $parts[1] ) > 0 ){ |
| 122 | 129 | $this->significantFigures = intval( $parts[1] ); |
| 123 | 130 | } |
| | 131 | + |
| | 132 | + } elseif( $magicWords->language->matchStartAndRemove( $parts[0] ) ) { |
| | 133 | + # if this is an invalid code we'll get $wgContLang back |
| | 134 | + $this->language = Language::factory( $parts[1] ); |
| 124 | 135 | } |
| 125 | 136 | |
| 126 | 137 | } elseif( $magicWords->linkunit->matchStartAndRemove( $parts[0] ) ) { |
| — | — | @@ -187,7 +198,8 @@ |
| 188 | 199 | $unit = $this->targetUnit->getText( |
| 189 | 200 | $this->lastValue, |
| 190 | 201 | $this->link, |
| 191 | | - $this->abbreviate |
| | 202 | + $this->abbreviate, |
| | 203 | + $this->language |
| 192 | 204 | ); |
| 193 | 205 | return "$string $unit"; |
| 194 | 206 | } |
| — | — | @@ -689,57 +701,64 @@ |
| 690 | 702 | * Get the text of the unit |
| 691 | 703 | * @param $value String number for PLURAL support |
| 692 | 704 | * @param $link Bool |
| | 705 | + * @param $language Language |
| 693 | 706 | * @return String |
| 694 | 707 | */ |
| 695 | | - public function getText( $value, $link=false, $abbreviate=false ){ |
| | 708 | + public function getText( $value, $link=false, $abbreviate=false, $language=null ){ |
| 696 | 709 | global $wgContLang; |
| 697 | 710 | $value = $wgContLang->formatNum( $value ); |
| 698 | | - $abbr = $abbreviate ? '-abbr' : ''; |
| 699 | 711 | |
| 700 | 712 | if( !is_array( $this->unitName ) ){ |
| 701 | | - $msg = "pfunc-convert-unit-{$this->dimension->getName()}-{$this->unitName}"; |
| 702 | | - $msgText = wfMsgExt( "$msg$abbr", array( 'parsemag', 'content' ), $value ); |
| 703 | | - if( $link && !wfEmptyMsg( "$msg-link" ) ){ |
| 704 | | - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg-link" ) ); |
| 705 | | - $msgText = "[[{$title->getFullText()}|$msgText]]"; |
| 706 | | - } |
| | 713 | + $msgText = $this->getTextFromMessage( |
| | 714 | + "pfunc-convert-unit-{$this->dimension->getName()}-{$this->unitName}", |
| | 715 | + $value, $link, $abbreviate, $language |
| | 716 | + ); |
| 707 | 717 | |
| 708 | 718 | } elseif( !wfEmptyMsg( "pfunc-convert-unit-{$this->dimension->getName(true)}-{$this->unitName[0]}-{$this->unitName[1]}" ) ){ |
| 709 | 719 | # A wiki has created, say, [[MediaWiki:pfunc-convert-unit-speed-metres-second]] |
| 710 | 720 | # so they can have it display "<metres per second>" rather than |
| 711 | 721 | # "<metres>/<second>" |
| 712 | | - $msg = "pfunc-convert-unit-{$this->dimension->getName(true)}-{$this->unitName[0]}-{$this->unitName[1]}"; |
| 713 | | - $msgText = wfMsgExt( "$msg$abbr", array( 'parsemag', 'content' ), $value ); |
| 714 | | - if( $link && !wfEmptyMsg( "$msg-link" ) ){ |
| 715 | | - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg-link" ) ); |
| 716 | | - if( $title instanceof Title ){ |
| 717 | | - $msgText = "[[{$title->getFullText()}|$msgText]]"; |
| 718 | | - } |
| 719 | | - } |
| | 722 | + $msgText = $this->getTextFromMessage( |
| | 723 | + "pfunc-convert-unit-{$this->dimension->getName(true)}-{$this->unitName[0]}-{$this->unitName[1]}", |
| | 724 | + $value, $link, $abbreviate, $language |
| | 725 | + ); |
| 720 | 726 | |
| 721 | 727 | } else { |
| 722 | 728 | $dimensionNames = $this->dimension->getName(); |
| 723 | | - $msg = "pfunc-convert-unit-{$dimensionNames[0]}-{$this->unitName[0]}"; |
| 724 | | - $msgText = wfMsgExt( "$msg$abbr", array( 'parsemag', 'content' ), $value ); |
| 725 | | - if( $link && !wfEmptyMsg( "$msg-link" ) ){ |
| 726 | | - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg-link" ) ); |
| 727 | | - $msgText = "[[{$title->getFullText()}|$msgText]]"; |
| 728 | | - } |
| 729 | | - |
| 730 | | - $msg2 = "pfunc-convert-unit-{$dimensionNames[1]}-{$this->unitName[1]}"; |
| 731 | | - $msg2Text = wfMsgExt( "$msg2$abbr", array( 'parsemag', 'content' ), 1 ); # Singular for denominator |
| 732 | | - if( $link && !wfEmptyMsg( "$msg2-link" ) ){ |
| 733 | | - $title = Title::newFromText( wfMsgForContentNoTrans( "$msg2-link" ) ); |
| 734 | | - if( $title instanceof Title ){ |
| 735 | | - $msg2Text = "[[{$title->getFullText()}|$msg2Text]]"; |
| 736 | | - } |
| 737 | | - } |
| | 729 | + $msgText = $this->getTextFromMessage( |
| | 730 | + "pfunc-convert-unit-{$dimensionNames[0]}-{$this->unitName[0]}", |
| | 731 | + $value, $link, $abbreviate, $language |
| | 732 | + ); |
| | 733 | + $msg2Text = $this->getTextFromMessage( |
| | 734 | + "pfunc-convert-unit-{$dimensionNames[1]}-{$this->unitName[1]}", |
| | 735 | + 1, # Singular for denominator |
| | 736 | + $link, $abbreviate, $language |
| | 737 | + ); |
| 738 | 738 | $msgText = "$msgText/$msg2Text"; |
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 741 | return $msgText; |
| 742 | 742 | } |
| 743 | 743 | |
| | 744 | + protected function getTextFromMessage( $key, $number, $link, $abbreviate, $language ){ |
| | 745 | + $abbr = $abbreviate ? '-abbr' : ''; |
| | 746 | + |
| | 747 | + $text = wfMsgExt( |
| | 748 | + "$key$abbr", |
| | 749 | + array( 'parsemag', 'language' => $language ), |
| | 750 | + $number |
| | 751 | + ); |
| | 752 | + |
| | 753 | + if( $link && !wfEmptyMsg( "$key-link" ) ){ |
| | 754 | + $title = Title::newFromText( wfMsgForContentNoTrans( "$key-link" ) ); |
| | 755 | + if( $title instanceof Title ){ |
| | 756 | + $text = "[[{$title->getFullText()}|$text]]"; |
| | 757 | + } |
| | 758 | + } |
| | 759 | + |
| | 760 | + return $text; |
| | 761 | + } |
| | 762 | + |
| 744 | 763 | /** |
| 745 | 764 | * Get the default (usually SI) unit associated with this particular dimension |
| 746 | 765 | * @return ConvertUnit |
| Index: trunk/extensions/ParserFunctions/ParserFunctions.i18n.magic.php |
| — | — | @@ -29,6 +29,7 @@ |
| 30 | 30 | 'decimalplaces' => array( 0, '#dp' ), |
| 31 | 31 | 'significantfigures' => array( 0, '#sf' ), |
| 32 | 32 | 'abbreviate' => array( 0, '#abbreviate' ), |
| | 33 | + 'language' => array( 0, '#language' ), |
| 33 | 34 | 'len' => array( 0, 'len' ), |
| 34 | 35 | 'pos' => array( 0, 'pos' ), |
| 35 | 36 | 'rpos' => array( 0, 'rpos' ), |
| Index: trunk/extensions/ParserFunctions/ParserFunctions.i18n.php |
| — | — | @@ -55,17 +55,17 @@ |
| 56 | 56 | 'pfunc-convert-dimension-fuelefficiencynegative' => 'fuelefficiencynegative', |
| 57 | 57 | |
| 58 | 58 | # LENGTH |
| 59 | | - 'pfunc-convert-unit-length-gigametre' => '{{PLURAL:$1|gigametre|gigametres}}', |
| 60 | | - 'pfunc-convert-unit-length-megametre' => '{{PLURAL:$1|megametre|megametres}}', |
| 61 | | - 'pfunc-convert-unit-length-kilometre' => '{{PLURAL:$1|kilometre|kilometres}}', |
| 62 | | - 'pfunc-convert-unit-length-hectometre' => '{{PLURAL:$1|hectometre|hectometres}}', |
| 63 | | - 'pfunc-convert-unit-length-decametre' => '{{PLURAL:$1|decametre|decametres}}', |
| 64 | | - 'pfunc-convert-unit-length-metre' => '{{PLURAL:$1|metre|metres}}', |
| 65 | | - 'pfunc-convert-unit-length-decimetre' => '{{PLURAL:$1|decimetre|decimetres}}', |
| 66 | | - 'pfunc-convert-unit-length-centimetre' => '{{PLURAL:$1|centimetre|centimetres}}', |
| 67 | | - 'pfunc-convert-unit-length-millimetre' => '{{PLURAL:$1|millimetre|millimetres}}', |
| 68 | | - 'pfunc-convert-unit-length-micrometre' => '{{PLURAL:$1|micrometre|micrometres}}', |
| 69 | | - 'pfunc-convert-unit-length-nanometre' => '{{PLURAL:$1|nanometre|nanometres}}', |
| | 59 | + 'pfunc-convert-unit-length-gigametre' => '{{PLURAL:$1|gigameter|gigameters}}', |
| | 60 | + 'pfunc-convert-unit-length-megametre' => '{{PLURAL:$1|megameter|megameters}}', |
| | 61 | + 'pfunc-convert-unit-length-kilometre' => '{{PLURAL:$1|kilometer|kilometers}}', |
| | 62 | + 'pfunc-convert-unit-length-hectometre' => '{{PLURAL:$1|hectometer|hectometers}}', |
| | 63 | + 'pfunc-convert-unit-length-decametre' => '{{PLURAL:$1|decameter|decameters}}', |
| | 64 | + 'pfunc-convert-unit-length-metre' => '{{PLURAL:$1|meter|meters}}', |
| | 65 | + 'pfunc-convert-unit-length-decimetre' => '{{PLURAL:$1|decimeter|decimeters}}', |
| | 66 | + 'pfunc-convert-unit-length-centimetre' => '{{PLURAL:$1|centimeter|centimeters}}', |
| | 67 | + 'pfunc-convert-unit-length-millimetre' => '{{PLURAL:$1|millimeter|millimeters}}', |
| | 68 | + 'pfunc-convert-unit-length-micrometre' => '{{PLURAL:$1|micrometer|micrometers}}', |
| | 69 | + 'pfunc-convert-unit-length-nanometre' => '{{PLURAL:$1|nanometer|nanometers}}', |
| 70 | 70 | 'pfunc-convert-unit-length-angstrom' => '{{PLURAL:$1|angstrom|angstroms}}', |
| 71 | 71 | 'pfunc-convert-unit-length-mile' => '{{PLURAL:$1|mile|miles}}', |
| 72 | 72 | 'pfunc-convert-unit-length-furlong' => '{{PLURAL:$1|furlong|furlongs}}', |
| — | — | @@ -124,10 +124,10 @@ |
| 125 | 125 | 'pfunc-convert-unit-length-astronomicalunit-abbr' => 'AU', |
| 126 | 126 | |
| 127 | 127 | # AREA # |
| 128 | | - 'pfunc-convert-unit-area-squarekilometre' => '{{PLURAL:$1|square kilometre|square kilometres}}', |
| 129 | | - 'pfunc-convert-unit-area-squaremetre' => '{{PLURAL:$1|square metre|square metres}}', |
| 130 | | - 'pfunc-convert-unit-area-squarecentimetre' => '{{PLURAL:$1|square centimetre|square centimetres}}', |
| 131 | | - 'pfunc-convert-unit-area-squaremillimetre' => '{{PLURAL:$1|square millimetre|square millimetres}}', |
| | 128 | + 'pfunc-convert-unit-area-squarekilometre' => '{{PLURAL:$1|square kilometer|square kilometers}}', |
| | 129 | + 'pfunc-convert-unit-area-squaremetre' => '{{PLURAL:$1|square meter|square meters}}', |
| | 130 | + 'pfunc-convert-unit-area-squarecentimetre' => '{{PLURAL:$1|square centimeter|square centimeters}}', |
| | 131 | + 'pfunc-convert-unit-area-squaremillimetre' => '{{PLURAL:$1|square millimeter|square millimeters}}', |
| 132 | 132 | 'pfunc-convert-unit-area-hectare' => '{{PLURAL:$1|hectare|hectares}}', |
| 133 | 133 | 'pfunc-convert-unit-area-squaremile' => '{{PLURAL:$1|square mile|square miles}}', |
| 134 | 134 | 'pfunc-convert-unit-area-acre' => '{{PLURAL:$1|acre|acres}}', |
| — | — | @@ -166,13 +166,13 @@ |
| 167 | 167 | 'pfunc-convert-unit-time-minute-abbr' => 'min', |
| 168 | 168 | |
| 169 | 169 | # VOLUME # |
| 170 | | - 'pfunc-convert-unit-volume-cubicmetre' => '{{PLURAL:$1|cubic metre|cubic metres}}', |
| 171 | | - 'pfunc-convert-unit-volume-cubiccentimetre' => '{{PLURAL:$1|cubic centimetre|cubic centimetres}}', |
| 172 | | - 'pfunc-convert-unit-volume-cubicmillimetre' => '{{PLURAL:$1|cubic millimetre|cubic millimetres}}', |
| 173 | | - 'pfunc-convert-unit-volume-kilolitre' => '{{PLURAL:$1|kilolitre|kilolitres}}', |
| 174 | | - 'pfunc-convert-unit-volume-litre' => '{{PLURAL:$1|litre|litres}}', |
| 175 | | - 'pfunc-convert-unit-volume-centilitre' => '{{PLURAL:$1|centilitre|centilitres}}', |
| 176 | | - 'pfunc-convert-unit-volume-millilitre' => '{{PLURAL:$1|millilitre|millilitres}}', |
| | 170 | + 'pfunc-convert-unit-volume-cubicmetre' => '{{PLURAL:$1|cubic meter|cubic meters}}', |
| | 171 | + 'pfunc-convert-unit-volume-cubiccentimetre' => '{{PLURAL:$1|cubic centimeter|cubic centimeters}}', |
| | 172 | + 'pfunc-convert-unit-volume-cubicmillimetre' => '{{PLURAL:$1|cubic millimeter|cubic millimeters}}', |
| | 173 | + 'pfunc-convert-unit-volume-kilolitre' => '{{PLURAL:$1|kiloliter|kiloliters}}', |
| | 174 | + 'pfunc-convert-unit-volume-litre' => '{{PLURAL:$1|liter|liters}}', |
| | 175 | + 'pfunc-convert-unit-volume-centilitre' => '{{PLURAL:$1|centiliter|centiliters}}', |
| | 176 | + 'pfunc-convert-unit-volume-millilitre' => '{{PLURAL:$1|milliliter|milliliters}}', |
| 177 | 177 | 'pfunc-convert-unit-volume-cubicyard' => '{{PLURAL:$1|cubic yard|cubic yards}}', |
| 178 | 178 | 'pfunc-convert-unit-volume-cubicfoot' => '{{PLURAL:$1|cubic foot|cubic feet}}', |
| 179 | 179 | 'pfunc-convert-unit-volume-cubicinch' => '{{PLURAL:$1|cubic inch|cubic inches}}', |
| — | — | @@ -245,7 +245,7 @@ |
| 246 | 246 | 'pfunc-convert-unit-pressure-barye' => 'barye', |
| 247 | 247 | 'pfunc-convert-unit-pressure-atmosphere' => '{{PLURAL:$1|atmosphere|atmospheres}}', |
| 248 | 248 | 'pfunc-convert-unit-pressure-torr' => '{{PLURAL:$1|Torr|Torr}}', |
| 249 | | - 'pfunc-convert-unit-pressure-mmhg' => '{{PLURAL:$1|milimetre of mercury|milimetres of mercury}}', |
| | 249 | + 'pfunc-convert-unit-pressure-mmhg' => '{{PLURAL:$1|milimeter of mercury|milimeters of mercury}}', |
| 250 | 250 | 'pfunc-convert-unit-pressure-inhg' => '{{PLURAL:$1|inch of mercury|inches of mercury}}', |
| 251 | 251 | 'pfunc-convert-unit-pressure-psi' => '{{PLURAL:$1|pound per square-inch|pounds per square-inch}}', |
| 252 | 252 | |
| — | — | @@ -811,6 +811,43 @@ |
| 812 | 812 | 'pfunc_string_too_long' => 'Σφάλμα: ο ορμαθός υπερβαίνει $1 το όριο χαρακτήρων', |
| 813 | 813 | ); |
| 814 | 814 | |
| | 815 | +/** |
| | 816 | + * British english |
| | 817 | + * @author Happy-melon |
| | 818 | + */ |
| | 819 | +$messages['en-gb'] = array( |
| | 820 | + # LENGTH |
| | 821 | + 'pfunc-convert-unit-length-gigametre' => '{{PLURAL:$1|gigametre|gigametres}}', |
| | 822 | + 'pfunc-convert-unit-length-megametre' => '{{PLURAL:$1|megametre|megametres}}', |
| | 823 | + 'pfunc-convert-unit-length-kilometre' => '{{PLURAL:$1|kilometre|kilometres}}', |
| | 824 | + 'pfunc-convert-unit-length-hectometre' => '{{PLURAL:$1|hectometre|hectometres}}', |
| | 825 | + 'pfunc-convert-unit-length-decametre' => '{{PLURAL:$1|decametre|decametres}}', |
| | 826 | + 'pfunc-convert-unit-length-metre' => '{{PLURAL:$1|metre|metres}}', |
| | 827 | + 'pfunc-convert-unit-length-decimetre' => '{{PLURAL:$1|decimetre|decimetres}}', |
| | 828 | + 'pfunc-convert-unit-length-centimetre' => '{{PLURAL:$1|centimetre|centimetres}}', |
| | 829 | + 'pfunc-convert-unit-length-millimetre' => '{{PLURAL:$1|millimetre|millimetres}}', |
| | 830 | + 'pfunc-convert-unit-length-micrometre' => '{{PLURAL:$1|micrometre|micrometres}}', |
| | 831 | + 'pfunc-convert-unit-length-nanometre' => '{{PLURAL:$1|nanometre|nanometres}}', |
| | 832 | + |
| | 833 | + # AREA # |
| | 834 | + 'pfunc-convert-unit-area-squarekilometre' => '{{PLURAL:$1|square kilometre|square kilometres}}', |
| | 835 | + 'pfunc-convert-unit-area-squaremetre' => '{{PLURAL:$1|square metre|square metres}}', |
| | 836 | + 'pfunc-convert-unit-area-squarecentimetre' => '{{PLURAL:$1|square centimetre|square centimetres}}', |
| | 837 | + 'pfunc-convert-unit-area-squaremillimetre' => '{{PLURAL:$1|square millimetre|square millimetres}}', |
| | 838 | + |
| | 839 | + # VOLUME # |
| | 840 | + 'pfunc-convert-unit-volume-cubicmetre' => '{{PLURAL:$1|cubic metre|cubic metres}}', |
| | 841 | + 'pfunc-convert-unit-volume-cubiccentimetre' => '{{PLURAL:$1|cubic centimetre|cubic centimetres}}', |
| | 842 | + 'pfunc-convert-unit-volume-cubicmillimetre' => '{{PLURAL:$1|cubic millimetre|cubic millimetres}}', |
| | 843 | + 'pfunc-convert-unit-volume-kilolitre' => '{{PLURAL:$1|kilolitre|kilolitres}}', |
| | 844 | + 'pfunc-convert-unit-volume-litre' => '{{PLURAL:$1|litre|litres}}', |
| | 845 | + 'pfunc-convert-unit-volume-centilitre' => '{{PLURAL:$1|centilitre|centilitres}}', |
| | 846 | + 'pfunc-convert-unit-volume-millilitre' => '{{PLURAL:$1|millilitre|millilitres}}', |
| | 847 | + |
| | 848 | + # PRESSURE |
| | 849 | + 'pfunc-convert-unit-pressure-mmhg' => '{{PLURAL:$1|milimetre of mercury|milimetres of mercury}}', |
| | 850 | +); |
| | 851 | + |
| 815 | 852 | /** Esperanto (Esperanto) |
| 816 | 853 | * @author Yekrats |
| 817 | 854 | */ |