Uporabnik:Johnuniq/translate

Iz Wikipedije, proste enciklopedije
Jump to navigation Jump to search

This page is to discuss what is needed to prepare Module:Convert for use on this wiki. I will check back here and see if any discussion is wanted—I'm hoping people will add comments and answer questions as needed. Johnuniq (pogovor) 11:18, 16. januar 2014 (CET)

Module overview[uredi | uredi kodo]

  • Modul:Convert • Should not be changed! If you think something needs changing, please discuss first.
  • Modul:Convert/data • Unit definitions. Must not be changed (see below).
  • Modul:Convert/text • Text for options and messages. Needs to be changed.

Convert/data must not be changed because it is generated by running a script which reads the data from a master list. The master list at enwiki is en:Module:Convert/documentation/conversion data/doc. To convert unit symbols and names, I will add a list of the units that are used in articles to this page, and will ask for the list to be edited on this page. When finished, I will process all the definitions. When everything is done, this wiki will be autonomous and editors here will be able to run the script and make changes themselves. I just intend helping getting it started. Johnuniq (pogovor) 11:18, 16. januar 2014 (CET)

Convert/text[uredi | uredi kodo]

Convert/text needs lots of translations, but not everything is needed because there will be many features that are not used here.

To start, please consider what names to use for the error tracking categories:

I see that many units here are displayed as a symbol ("m") rather than a name ("metre"). The old and new convert systems both show the name of the input unit by default. If that is not wanted, I'll have to think about how best to handle the situation. However, if a unit does have a name (such as "metre"), and if no plural name is defined for that unit, convert defaults to adding an "s" to make "metres" when required. I have disabled that by putting the following in convert/text:

plural_suffix = ''

Are unit names wanted? Does a name have a plural form? I assume you want the "s" disabled?

The next thing should probably be the SI prefixes ("kilo" and so on). Search the page for "SIprefixes" to see the list. I need to know the symbol ("k") and the name ("kilo") that is wanted here. Johnuniq (pogovor) 11:18, 16. januar 2014 (CET)

--Pinky sl (pogovor) 19:00, 16. januar 2014 (CET)

Unit names[uredi | uredi kodo]

I got the message that there is no reasonable way to specify the exact name that should be used for a unit. I will be able to think of some trick so symbols are shown, but I need more details. One approach would be to have a new setting which makes the module assume "abbr=on", and that will make it output symbols. However, what should the module do if a convert uses "abbr=off"? There are two ways to handle that:

  • Ignore the setting in the template, and force abbr=on always.
  • Accept the setting in the template, and show the name. With this scenario, abbr=on is the default, but it can be overridden.

The latter might be useful if there is a name that could be entered for each unit which would be acceptable for display if abbr=off is used. Thoughts? Johnuniq (pogovor) 12:05, 16. januar 2014 (CET)

Because of en:Slovene declension#Nouns we cannot know which case (nominative, genitive, dative, accusative, locative, or instrumental) user will use. I'm considering that outputs in our Convert template should only be abbreviations. --Pinky sl (pogovor) 18:59, 16. januar 2014 (CET)
I prefer your second suggestion abbr=on is by default, but it can be overridden. --Pinky sl (pogovor) 20:12, 16. januar 2014 (CET)
OK, I have implemented that and abbr=on is now the default. Johnuniq (pogovor) 01:32, 17. januar 2014 (CET)

Converts with en numbers[uredi | uredi kodo]

The following shows articles at 16 January 2014 that had numbers like "1.80" in converts.

Several of the above have been fixed, but the list should be checked. Johnuniq (pogovor) 03:35, 17. januar 2014 (CET)

DaD Opravljeno - I fixed remaining articles from above. --Pinky sl (pogovor) 12:04, 17. januar 2014 (CET)

Units used[uredi | uredi kodo]

The following shows the units used in articles at sl.wiki at 16 January 2014. The list shows only units used in {{convert}}—it does not include any that may result from other templates such as infoboxes. It also does not include units like "cm" because that is "m" with an SI prefix.

Aliases used

  • kph = km/h
  • ft3 = cuft
  • sqm = m2

Output multiple used

  • ftin (output ft + in)
Unit code Unit symbol Unit name 1 (also unit name) 2 plural for 3&4 0 and plural for >4 real numbers like 0,5 ali 3/4
acre acre acre aker akra akri akrov akra
cuft cu ft cubic foot kubični čevelj kubična čevlja kubični čevlji kubičnih čevljev kubičnega čevlja
ft ft foot čevelj čevlja čevlji čevljev čevlja
g g gram gram grama grami gramov grama
ihp ihp indicated horsepower indikatorska konjska moč indikatorski konjski moči indikatorske konjske moči indikatorskih konjskih moči indikatorske konjske moči
impgal imp gal imperial gallon imperialna galona imperialni galoni imperialne galone imperialnih galon imperialne galone
in in inch palec palca palci palcev palca
km/h km/h kilometre per hour kilometer na uro kilometra na uro kilometre na uro kilometrov na uro kilometra na uro
kn kn knot vozel vozla vozli vozlov vozla
L L litre liter litra litre litrov litra
l l litre liter litra litre litrov litra
lb lb pound funt funta funti funtov funta
lb-f lbf pound-force sila funta sili funta sile funta sil funta sile funta
lbf lbf pound-force sila funta sili funta sile funta sil funta sile funta
LT long ton long ton angleška tona angleški toni angleške tone angleških ton angleške tone
m m metre meter metra metri metrov metra
m2 m2 square metre kvadratni meter kvadratna metra kvadratni metri kvadratnih metrov kvadratnega metra
m3 m3 cubic metre kubični meter kubična metra kubični metri kubičnih metrov kubičnega metra
mi mi mile milja milji milje milj milje
mph mph mile per hour milja na uro milji na uro milje na uro milj na uro milje na uro
N N newton newton newtona newtoni newtonov newtona
NM NM nautical mile morska milja morski milji morske milje morskih milj morske milje
nmi nmi nautical mile morska milja morski milji morske milje morskih milj morske milje
oz oz ounce unča unči unče unč unče
sqft sq ft square foot kvadratni čevelj kvadratna čevlja kvadratni čevlji kvadratnih čevljev kvadratnega čevlja
ST short ton short ton ameriška tona ameriški toni ameriške tone ameriških ton ameriške tone
t t tonne metrska tona metrski toni metrske tone metrskih ton metrske tone
USgal US gal US gallon ameriška galona ameriški galoni ameriške galone ameriških galon ameriške galone
W W watt vat vata vati vatov vata
W W watt vat vata vati vatov vata
hp hp horsepower konjska moč konjski moči konjske moči konjskih moči konjske moči
ha ha hectare hektar hektara hektari hektarov hektara
a a are ar ara ari arov ara

Translations are needed for the above. Probably best to just edit the above table and replace the symbol/name. Also need plural names. Assuming the US column is not needed, perhaps put plurals there. The names will only appear if abbr=off is used. Johnuniq (pogovor) 03:35, 17. januar 2014 (CET)

I asked for a little help with this, because some of the units are not well known, so it will take some time. And by the way, we dont have just singular and plural:
  • an example for integer output value for meter: 0 metrov, 1 meter, 2 metra, 3 metre/4 metre, 5 metrov or more).
  • an example for real output value for meter it is only one form: 0,2 metra, 100,45 metra, 3,3 metra

--Pinky sl (pogovor) 11:59, 17. januar 2014 (CET)

Is it likely that the same set of rules would apply to a signicant number of units, in particular, to the units in the table above? What you have outlined is complex but it is achievable, however I guess from the word "example" that another unit might have a different set of rules. Also, you pointed to en:Slovene declension which I infer means that the name to be used for a unit depends on context—and that is in addition to depending on the value as in the m example above. If you can devise a set of rules that would cover most of the units used, I could think about an implementation. Or, there could be just two names defined for each unit—using the m example, meter if 1, otherwise metra. Then the editor would have to know that if they use the default, unit symbols will be shown, but if they use abbr=off, the result will be either meter or metra (so they had better make sure that is correct). Johnuniq (pogovor) 07:25, 18. januar 2014 (CET)
I added a few entries and someone must check and complet them, I still think this is too complicated (even I am a little lost, I cannot explain this in my own language), I posted a message for help on page Wikipedija:Pod lipo#Sklanjanje merskih enot. If we want to get this right we should have for each unit 5 states according to calculated output value - and maybe it is for the best, that we use abbr. I hope somebody will join us soon (otherwise it is maybe for the best, that we use only abbr.) --Pinky sl (pogovor) 11:14, 18. januar 2014 (CET)
@Pinky sl: Is there a reason that the last column is in italics? Is "0,5 m" written as "0,5 metra" or "0,5 metra"? Johnuniq (pogovor) 12:22, 21. januar 2014 (CET)
Just making it clear that set of rules mentioned for 0,1,2,3,4,5.... does not apply for real numbers (real numbers have just one form). Unit names are now marked in red. --Pinky sl (pogovor) 08:39, 22. januar 2014 (CET)
added are (= 100 m2 - not sure about En spelling). Same entries as hectare (which - see its name - is 100 ar)92.230.244.174 06:16, 29. marec 2014 (CET)

Template:Convert/warning[uredi | uredi kodo]

I'm planning to create Pomoč:Convert sporočila (from en:Help:Convert messages) because error messages link to that page. To demonstrate all possible messages, another template is needed; at en.wiki that is en:Template:Convert/warning which has "warnings=2" to enable all warnings. The template to use the module here will set warnings=1 which only shows invalid options, whereas warnings=2 also shows empty options. What should "Template:Convert/warning" be called here? Johnuniq (pogovor) 11:02, 17. januar 2014 (CET)

You can leave the name as it is (Predloga:Convert/warning) (just like Predloga:Convert/text or Predloga:Convert/data). --Pinky sl (pogovor) 11:41, 17. januar 2014 (CET)
I started Pomoč:Convert sporočila. Should I use sandbox? You can continue and I will translate it later. --Pinky sl (pogovor) 14:05, 17. januar 2014 (CET)
I have copied all the message examples over and done what I can to fix them. We can remove "/peskovnik" from the converts when the main template invokes the module.
You may like to try copying the current {ombox} from en.wiki and see if it allows "small=yes" to work—it would be better if the box were aligned to the right as occurs on en.wiki.
Later you could translate the anchor text in the message table, but it would help me if it were left in English until a week or two after the module goes live because I can then see what the message is saying without effort. Johnuniq (pogovor) 01:49, 18. januar 2014 (CET)
DaD Done - Pomoč:Convert sporočila and Predloga:Convert/warning are translated. --Pinky sl (pogovor) 13:10, 20. januar 2014 (CET)

Correcting links[uredi | uredi kodo]

Where can I correct links on unit names/symbols? --Pinky sl (pogovor) 11:19, 18. januar 2014 (CET)

Add them to the above table if you like, or to the following new table which might be simpler. Replace the links shown with what should be used here. Some of these are duplicates, but I left the rows in the table so all units are shown as that will make later processing easier. Johnuniq (pogovor) 03:00, 19. januar 2014 (CET)
Unit code Link Sl. link
acre Acre Aker
cuft Cubic foot Kubični čevelj
ft Foot (unit) Čevelj (dolžinska mera)
g Gram Gram
ihp Horsepower#Indicated horsepower Konjska moč
impgal Imperial gallon Imperialna galona
in Inch Palec
km/h Kilometres per hour Kilometer na uro
kn Knot (unit) Vozel (enota)
L Litre Liter
l Litre Liter
lb Pound (mass) Funt (mera)
lb-f Pound-force Sila funta
lbf Pound-force Sila funta
LT Long ton Angleška tona
m Metre Meter
m2 Square metre Kvadratni meter
m3 Cubic metre Kubični meter
mi Mile Milja
mph Miles per hour Milja na uro
N Newton (unit) Newton
NM Nautical mile Morska milja
nmi Nautical mile Morska milja
oz Ounce Unča
sqft Square foot Kvadratni čevelj
ST Short ton Ameriška tona
t Tonne Tona
USgal US gallon Ameriška galona
W Watt Vat
hp Horsepower Konjska moč
ha Hectare Hektar
  • Update I may not be seen for a day or two, but I will be thinking about modifying convert to handle the unit names. It's definitely achievable, but the tricky part is merging it with convert for en.wiki without adding an undue overhead (because I do not want to support different versions of Module:Convert at different wikis). Johnuniq (pogovor) 08:04, 20. januar 2014 (CET)

Results[uredi | uredi kodo]

The following shows the units from above, with sample converts.

  • Column 1 shows the unit code ("X") used for each convert in that row.
  • Column 2 is the result from {{convert/peskovnik|1|X|lk=on|disp=br}} (disp=br inserts a line break).
  • Column 3 is the result from {{convert/peskovnik|1|X|abbr=off|disp=br}}.
  • Column 4 is the same as column 3 but uses value 2.
  • Column 5 is the same as column 3 but uses value 3.
  • Column 6 is the same as column 3 but uses value 4.
  • Column 7 is the same as column 3 but uses value 0.
  • Column 8 is the same as column 3 but uses value 5.
  • Column 9 is the same as column 3 but uses value 0,5.

Johnuniq (pogovor) 08:03, 22. januar 2014 (CET)

Unit 1 lk=on 1 2 3 4 0 5 0,5
acre 1 aker
0,40 ha
1 aker
0,40 hektara
2 akra
0,81 hektara
3 akri
1,2 hektara
4 akri
1,6 hektara
0 akrov
0 hektarov
5 akrov
2,0 hektara
0,5 akra
0,20 hektara
cuft cu ft
0,028 m3
1 kubični čevelj
0,028 kubičnega metra
2 kubična čevlja
0,057 kubičnega metra
3 kubični čevlji
0,085 kubičnega metra
4 kubični čevlji
0,11 kubičnega metra
0 kubičnih čevljev
0 kubičnih metrov
5 kubičnih čevljev
0,14 kubičnega metra
0,5 kubičnega čevlja
0,014 kubičnega metra
ft ft
0,30 m
1 čevelj
0,30 metra
2 čevlja
0,61 metra
3 čevlji
0,91 metra
4 čevlji
1,2 metra
0 čevljev
0 metrov
5 čevljev
1,5 metra
0,5 čevlja
0,15 metra
g g
0,035 oz
1 gram
0,035 unče
2 grama
0,071 unče
3 grami
0,11 unče
4 grami
0,14 unče
0 gramov
0 unč
5 gramov
0,18 unče
0,5 grama
0,018 unče
ihp ihp
0,75 kW
1 indikatorska konjska moč
0,75 kilovata
2 indikatorski konjski moči
1,5 kilovata
3 indikatorske konjske moči
2,2 kilovata
4 indikatorske konjske moči
3,0 kilovata
0 indikatorskih konjskih moči
0 kilovatov
5 indikatorskih konjskih moči
3,7 kilovata
0,5 indikatorske konjske moči
0,37 kilovata
impgal imp gal
4,5 l; 1,2 US gal
1 imperial gallon
4,5 litra; 1,2 ameriške galone
2 imperialni galoni
9,1 litra; 2,4 ameriške galone
3 imperialne galone
14 litrov; 3,6 ameriške galone
4 imperialne galone
18 litrov; 4,8 ameriške galone
0 imperialnih galon
0 litrov; 0 ameriških galon
5 imperialnih galon
23 litrov; 6,0 ameriške galone
0,5 imperialne galone
2,3 litra; 0,60 ameriške galone
in in
25 mm
1 palec
25 milimetrov
2 palca
51 milimetrov
3 palci
76 milimetrov
4 palci
100 milimetrov
0 palcev
0 milimetrov
5 palcev
130 milimetrov
0,5 palca
13 milimetrov
km/h km/h
0,62 mph
1 kilometer na uro
0,62 milje na uro
2 kilometra na uro
1,2 milje na uro
3 kilometre na uro
1,9 milje na uro
4 kilometre na uro
2,5 milje na uro
0 kilometrov na uro
0 milj na uro
5 kilometrov na uro
3,1 milje na uro
0,5 kilometra na uro
0,31 milje na uro
kn kn
1,9 km/h; 1,2 mph
1 vozel
1,9 kilometra na uro; 1,2 milje na uro
2 vozla
3,7 kilometra na uro; 2,3 milje na uro
3 vozli
5,6 kilometra na uro; 3,5 milje na uro
4 vozli
7,4 kilometra na uro; 4,6 milje na uro
0 vozlov
0 kilometrov na uro; 0 milj na uro
5 vozlov
9,3 kilometra na uro; 5,8 milje na uro
0,5 vozla
0,93 kilometra na uro; 0,58 milje na uro
L L
0,22 imp gal; 0,26 US gal
1 liter
0,22 imperialne galone; 0,26 ameriške galone
2 litra
0,44 imperialne galone; 0,53 ameriške galone
3 litre
0,66 imperialne galone; 0,79 ameriške galone
4 litre
0,88 imperialne galone; 1,1 ameriške galone
0 litrov
0 imperialnih galon; 0 ameriških galon
5 litrov
1,1 imperialne galone; 1,3 ameriške galone
0,5 litra
0,11 imperialne galone; 0,13 ameriške galone
l l
0,22 imp gal; 0,26 US gal
1 liter
0,22 imperialne galone; 0,26 ameriške galone
2 litra
0,44 imperialne galone; 0,53 ameriške galone
3 litre
0,66 imperialne galone; 0,79 ameriške galone
4 litre
0,88 imperialne galone; 1,1 ameriške galone
0 litrov
0 imperialnih galon; 0 ameriških galon
5 litrov
1,1 imperialne galone; 1,3 ameriške galone
0,5 litra
0,11 imperialne galone; 0,13 ameriške galone
lb lb
0,45 kg
1 funt
0,45 kilograma
2 funta
0,91 kilograma
3 funti
1,4 kilograma
4 funti
1,8 kilograma
0 funtov
0 kilogramov
5 funtov
2,3 kilograma
0,5 funta
0,23 kilograma
lb-f lbf
4,4 N
1 sila funta
4,4 newtona
2 sili funta
8,9 newtona
3 sile funta
13 newtonov
4 sile funta
18 newtonov
0 sil funta
0 newtonov
5 sil funta
22 newtonov
0,5 sile funta
2,2 newtona
lbf lbf
4,4 N
1 sila funta
4,4 newtona
2 sili funta
8,9 newtona
3 sile funta
13 newtonov
4 sile funta
18 newtonov
0 sil funta
0 newtonov
5 sil funta
22 newtonov
0,5 sile funta
2,2 newtona
LT 1 angleška tona
1,0 t
1 angleška tona
1,0 metrske tone
2 angleški toni
2,0 metrske tone
3 angleške tone
3,0 metrske tone
4 angleške tone
4,1 metrske tone
0 angleških ton
0 metrskih ton
5 angleških ton
5,1 metrske tone
0,5 angleške tone
0,51 metrske tone
m m
ftin
1 meter
3 čevlji 3 palci
2 metra
6 čevljev 7 palcev
3 metri
9,8 čevlja
4 metri
13 čevljev
0 metrov
0 čevljev
5 metrov
16 čevljev
0,5 metra
1 čevelj 8 palcev
m2 m2
11 sq ft
1 kvadratni meter
11 kvadratnih čevljev
2 kvadratna metra
22 kvadratnih čevljev
3 kvadratni metri
32 kvadratnih čevljev
4 kvadratni metri
43 kvadratnih čevljev
0 kvadratnih metrov
0 kvadratnih čevljev
5 kvadratnih metrov
54 kvadratnih čevljev
0,5 kvadratnega metra
5,4 kvadratnega čevlja
m3 m3
35 cu ft
1 kubični meter
35 kubičnih čevljev
2 kubična metra
71 kubičnih čevljev
3 kubični metri
110 kubičnih čevljev
4 kubični metri
140 kubičnih čevljev
0 kubičnih metrov
0 kubičnih čevljev
5 kubičnih metrov
180 kubičnih čevljev
0,5 kubičnega metra
18 kubičnih čevljev
mi mi
1,6 km
1 milja
1,6 kilometra
2 milji
3,2 kilometra
3 milje
4,8 kilometra
4 milje
6,4 kilometra
0 milj
0 kilometrov
5 milj
8,0 kilometra
0,5 milje
0,80 kilometra
mph mph
1,6 km/h
1 milja na uro
1,6 kilometra na uro
2 milji na uro
3,2 kilometra na uro
3 milje na uro
4,8 kilometra na uro
4 milje na uro
6,4 kilometra na uro
0 milj na uro
0 kilometrov na uro
5 milj na uro
8,0 kilometra na uro
0,5 milje na uro
0,80 kilometra na uro
N N
0,22 lbf
1 newton
0,22 sile funta
2 newtona
0,45 sile funta
3 newtoni
0,67 sile funta
4 newtoni
0,90 sile funta
0 newtonov
0 sil funta
5 newtonov
1,1 sile funta
0,5 newtona
0,11 sile funta
NM NM
1,9 km; 1,2 mi
1 morska milja
1,9 kilometra; 1,2 milje
2 morski milji
3,7 kilometra; 2,3 milje
3 morske milje
5,6 kilometra; 3,5 milje
4 morske milje
7,4 kilometra; 4,6 milje
0 morskih milj
0 kilometrov; 0 milj
5 morskih milj
9,3 kilometra; 5,8 milje
0,5 morske milje
0,93 kilometra; 0,58 milje
nmi nmi
1,9 km; 1,2 mi
1 morska milja
1,9 kilometra; 1,2 milje
2 morski milji
3,7 kilometra; 2,3 milje
3 morske milje
5,6 kilometra; 3,5 milje
4 morske milje
7,4 kilometra; 4,6 milje
0 morskih milj
0 kilometrov; 0 milj
5 morskih milj
9,3 kilometra; 5,8 milje
0,5 morske milje
0,93 kilometra; 0,58 milje
oz oz
28 g
1 unča
28 gramov
2 unči
57 gramov
3 unče
85 gramov
4 unče
110 gramov
0 unč
0 gramov
5 unč
140 gramov
0,5 unče
14 gramov
sqft sq ft
0,093 m2
1 kvadratni čevelj
0,093 kvadratnega metra
2 kvadratna čevlja
0,19 kvadratnega metra
3 kvadratni čevlji
0,28 kvadratnega metra
4 kvadratni čevlji
0,37 kvadratnega metra
0 kvadratnih čevljev
0 kvadratnih metrov
5 kvadratnih čevljev
0,46 kvadratnega metra
0,5 kvadratnega čevlja
0,046 kvadratnega metra
ST 1 ameriška tona
0,91 t
1 ameriška tona
0,91 metrske tone
2 ameriški toni
1,8 metrske tone
3 ameriške tone
2,7 metrske tone
4 ameriške tone
3,6 metrske tone
0 ameriških ton
0 metrskih ton
5 ameriških ton
4,5 metrske tone
0,5 ameriške tone
0,45 metrske tone
t t
0,98 angleške tone; 1,1 ameriške tone
1 metrska tona
0,98 angleške tone; 1,1 ameriške tone
2 metrski toni
2,0 angleške tone; 2,2 ameriške tone
3 metrske tone
3,0 angleške tone; 3,3 ameriške tone
4 metrske tone
3,9 angleške tone; 4,4 ameriške tone
0 metrskih ton
0 angleških ton; 0 ameriških ton
5 metrskih ton
4,9 angleške tone; 5,5 ameriške tone
0,5 metrske tone
0,49 angleške tone; 0,55 ameriške tone
USgal US gal
3,8 l; 0,83 imp gal
1 ameriška galona
3,8 litra; 0,83 imperialne galone
2 ameriški galoni
7,6 litra; 1,7 imperialne galone
3 ameriške galone
11 litrov; 2,5 imperialne galone
4 ameriške galone
15 litrov; 3,3 imperialne galone
0 ameriških galon
0 litrov; 0 imperialnih galon
5 ameriških galon
19 litrov; 4,2 imperialne galone
0,5 ameriške galone
1,9 litra; 0,42 imperialne galone
W W
0,0013 hp
1 vat
0,0013 konjske moči
2 vata
0,0027 konjske moči
3 vati
0,0040 konjske moči
4 vati
0,0054 konjske moči
0 vatov
0 konjskih moči
5 vatov
0,0067 konjske moči
0,5 vata
0,00067 konjske moči
ha ha
2,5 akra
1 hektar
2,5 akra
2 hektara
4,9 akra
3 hektari
7,4 akra
4 hektari
9,9 akra
0 hektarov
0 akrov
5 hektarov
12 akrov
0,5 hektara
1,2 akra
hp hp
0,75 kW
1 konjska moč
0,75 kilovata
2 konjski moči
1,5 kilovata
3 konjske moči
2,2 kilovata
4 konjske moči
3,0 kilovata
0 konjskih moči
0 kilovatov
5 konjskih moči
3,7 kilovata
0,5 konjske moči
0,37 kilovata
This is well done. I look forward to see it in operation. --Pinky sl (pogovor) 08:47, 22. januar 2014 (CET)
Good, but please check the above carefully to see that I transcribed everything correctly. I have to do some more testing to see if unusual combinations break anything, but it should be ready to go live in a couple of days.
Uporabnik:Johnuniq/compare shows the converts actually used (apart from those in infoboxes), and they don't use the new features because you need abbr=off to see them. Nevertheless the ability to show different names depending on the value may be useful elsewhere, and you will find places to use it. The above table uses default outputs, and some of those may need updates. When I get around to it, I'll set up what you need to create the unit definitions. More stuff could be translated, but enough of the English definitions need to remain so that if an article is copied from en.wiki in the future, any converts it contains will work. Johnuniq (pogovor) 10:56, 22. januar 2014 (CET)
You deserve a medal for this. Thank you.
  • missing translations and links for ha and hp (look at updated tables)
  • changed acre (look at updated tables), oral was an ald slovenian unit
  • transcription was done correctly
  • I will do some testing with infoboxes
--Pinky sl (pogovor) 15:04, 22. januar 2014 (CET)
I changed acre and added ha and hp. Please check the tests above.
Do you offer medals? That would be nice! Johnuniq (pogovor) 10:39, 24. januar 2014 (CET)

What page should be used for the unit definitions? At en.wiki, it is en:Module:Convert/documentation/conversion data/doc and at vi.wiki it is vi:Module:Convert/documentation/conversion data/tài liệu. It has that strange name so that it is on a "doc" page in the module namespace (known as Modul: here). I guess consistency between the wikis would be helpful, so it would be Modul:Convert/documentation/conversion data/dok here? The "documentation" part was used for a trick at en.wiki which causes the "this is module documentation" box to not appear (see en:MediaWiki:Scribunto-doc-page-header). Johnuniq (pogovor) 10:51, 24. januar 2014 (CET)

I will give you a medal, but not just yet.
Tests are ok now.
Modul:Convert/documentation/conversion data/dok is ok

--Pinky sl (pogovor) 20:02, 24. januar 2014 (CET)

I have created:
Some details are tricky and you may want to ask for assistance, but you should be able to change units as required. I'm working on some details for the Vietnamese wiki and am likely to update things here because it's best if the different wikis are running the same code. Johnuniq (pogovor) 10:19, 25. januar 2014 (CET)

Please correct me if I'am wrong. If I want to add some new translations (like those in the table above) I have to:

  1. add a new row in Modul:Convert/documentation/conversion data/dok#Variable names
  2. update row in Modul:Convert/documentation/conversion data/dok#Conversions for corresponding units
  3. for test purpuses I've to put in sandbox code {{#invoke:convert/makeunits|makeunits}} - I've done that in Uporabnik:Pinky sl/Peskovnik6
  4. if there are no errors dislayed I can copy created text into Module:Convert/data.
  5. after that I can view the results in Pogovor o modulu:Convert/makeunits
  6. and the most important ... if anything goes wrong ... panick or asking you for assistance

--Pinky sl (pogovor) 12:21, 25. januar 2014 (CET)

  • Steps #1 and #2—yes.
  • Step #3—ok, but not needed as that is a duplicate of Pogovor o modulu:Convert/makeunits, so all that is required is to click the "purge this page" link at the latter.
  • Step #4—yes. If you were just adding a couple of new units, a simpler alternative would be to add just the new units to Modul:Convert/extra (see "making units" below).
  • Step #5—this is out of place; will explain below.
  • Step #6—yes (contact me at en.wiki if needed).
More below. Johnuniq (pogovor) 03:53, 26. januar 2014 (CET)

Making units[uredi | uredi kodo]

When adding new units, it may be better to add them to Modul:Convert/extra as it involves very little risk—even if extra is completely messed up, converts should still function. By contrast, a mistaken edit in Modul:Convert/data could break all converts, and that may not be immediately apparent (you would need to purge a page with a convert template to test if it still works). I guess I should add a testcases page for you to do tests.

To get used to the system, I recommend mucking around with a new page: User:Johnuniq/making units. Edit that page (or a copy), and experiment. Change the unit code "acre" to "Acre" and see what happens (an error). View the talk page for the results. You can use that set up to create new units to be added to convert/extra. The extra module is only useful for new units (something with an unknown unit code).

The procedure to change an existing unit is:

Johnuniq (pogovor) 03:53, 26. januar 2014 (CET)

Testcases (testniprimeri) already exists: Predloga:Convert/testniprimeri. --Pinky sl (pogovor) 11:40, 26. januar 2014 (CET)

Finished?[uredi | uredi kodo]

I think Convert template is ready for updating. If you agree I can transfer content from Predloga:Convert/peskovnik (if you prefer to do it yourself I can unprotect it) into Convert template. --Pinky sl (pogovor) 11:11, 1. februar 2014 (CET)

Thanks for the offer, but please go ahead and make the change. Let me know if you have any problems! I just made a couple of trivial edits to reduce the differences between the modules used here and the latest on my system—that makes any future upgrades a bit easier. You may want to protect the modules, and if I need to update them in the future I might ask for temporary unprotection (or you may want to give me template editor rights and protect them for that level).
I think there may be some problems with English numbers still used in converts here, but I haven't had time to work on that. I hope to adapt some code that was added at vi.wiki that interprets a number like 1.23 as 1,23 and adds a warning that the wikitext needs to be fixed. I don't know when that will happen...
As discussed, |abbr=on default in the template means that your work with unit names will not show a unit name unless |abbr=off is used in a convert. I'll probably return in due course and see how the error categories (listed on my user page) are going. Johnuniq (pogovor) 02:36, 4. februar 2014 (CET)

To expand on my last comment, these abbr options are available:

  • {{convert/peskovnik|2|cuft|impgal}} → 2 cu ft (12 imp gal)
  • {{convert/peskovnik|2|cuft|impgal|abbr=off}} → 2 kubična čevlja (12 imperialnih galon)
  • {{convert/peskovnik|2|cuft|impgal|abbr=in}} → 2 cu ft (12 imperialnih galon)
  • {{convert/peskovnik|2|cuft|impgal|abbr=out}} → 2 kubična čevlja (12 imp gal)

If wanted, more translation could be done, such as the unit symbols shown above. Johnuniq (pogovor) 00:57, 5. februar 2014 (CET)

Predloga:Convert is now updated. I will try in do some work on documentation - I dont have much time lately. --Pinky sl (pogovor) 21:15, 5. februar 2014 (CET)