"ମଡ୍ୟୁଲ:Age" ପୃଷ୍ଠାର ସଂସ୍କରଣ‌ଗୁଡ଼ିକ ମଧ୍ୟରେ ତଫାତ

Content deleted Content added
ଟିକେNo edit summary
change default for {{age}} from range=no to range=dash per Template talk:Age#Inaccurate age shown
ଟ୍ୟାଗ: Reverted
୨୬ କ ଧାଡ଼ି:
['mt-template-bad-name'] = 'The specified template name is not valid',
['mt-template-x'] = 'The template invoking this must have "|template=x" where x is the wanted operation',
['txt-and'] = ' and ',
['txt-or'] = '  କିମ୍ବାor ',
['txt-category'] = 'Category:Age error',
['txt-comma-and'] = ', and ',
['txt-error'] = 'Error: ',
['txt-format-default'] = 'dfmf', -- 'df' (day first = dmy) or 'mf' (month first = mdy)
['txt-module-convertnumeric'] = 'Module:ConvertNumeric',
['txt-module-date'] = 'Module:Date',
['txt-sandbox'] = 'sandbox',
['txt-bda'] = '<span style="display:none"> (<span class="bday">$1</span>) </span>$2<span class="noprint ForceAgeToShow"> (ବୟସage&nbsp;$3)</span>',
['txt-dda'] = '$2<span style="display:none">($1)</span> (ବୟସaged&nbsp;$3)',
['txt-bda-disp'] = 'disp_raw', -- disp_raw → age is a number only; disp_age → age is a number and unit (normally years but months or days if very young)
['txt-dda-disp'] = 'disp_raw',
୪୭ କ ଧାଡ଼ି:
}
 
local translate, =from_en, {to_en, isZero
digits = {
from_en = {
['0'] = '୦',
['1'] = '୧',
['2'] = '୨',
['3'] = '୩',
['4'] = '୪',
['5'] = '୫',
['6'] = '୬',
['7'] = '୭',
['8'] = '୮',
['9'] = '୯',
},
to_en = {
['୦'] = '0',
['୧'] = '1',
['୨'] = '2',
['୩'] = '3',
['୪'] = '4',
['୫'] = '5',
['୬'] = '6',
['୭'] = '7',
['୮'] = '8',
['୯'] = '9',
},
},
words = {
from_en = {
January = 'ଜାନୁଆରୀ',
February = 'ଫେବୃଆରୀ',
March = 'ମାର୍ଚ୍ଚ',
April = 'ଅପ୍ରେଲ',
May = 'ମଇ',
June = 'ଜୁନ',
July = 'ଜୁଲାଇ',
August = 'ଅଗଷ୍ଟ',
September = 'ସେପ୍ଟେମ୍ବର',
October = 'ଅକ୍ଟୋବର',
November = 'ନଭେମ୍ବର',
December = 'ଡିସେମ୍ବର',
},
to_en = {
['ଜାନୁଆରୀ'] = 'January',
['ଫେବୃଆରୀ'] = 'February',
['ମାର୍ଚ୍ଚ'] = 'March',
['ଅପ୍ରେଲ'] = 'April',
['ମଇ'] = 'May',
['ଜୁନ'] = 'June',
['ଜୁଲାଇ'] = 'July',
['ଅଗଷ୍ଟ'] = 'August',
['ସେପ୍ଟେମ୍ବର '] = 'September',
['ଅକ୍ଟୋବର'] = 'October',
['ନଭେମ୍ବର'] = 'November',
['ଡିସେମ୍ବର'] = 'December',
},
},
}
 
local from_en, to_en, isZero
if translate then
-- Functions to translate from en to local language and reverse go here.
-- See example at [[:bn:Module:বয়স]].
from_en = function (text)
-- Translate en output to local language.
return (text
:gsub('%d', translate.digits.from_en)
:gsub('%a+', translate.words.from_en))
end
to_en = function (text)
text = mw.ustring.gsub(text, '%d', translate.digits.to_en)
-- Translate input in local language to en.
-- Following trick works for languages where all letters are non-ASCII.
-- It is needed because mw.ustring pattern '%a+' only finds parts of a word.
return (string.gsub(text, '[\128-\255]+', translate.words.to_en))
end
isZero = function (text)
return tonumber((mw.ustring.gsub(text or '', '%d', translate.digits.to_en))) == 0
end
else
from_en = function (text)
Line ୫୩୯ ⟶ ୪୬୪:
abbr_off = {
sep = '&nbsp;',
y = {'ବର୍ଷyear', 'years'},
m = {'ମାସmonth', 'months'},
w = {'ସପ୍ତାହweek', 'weeks'},
d = {'ଦିନday', 'days'},
H = {'ଘଣ୍ଟାhour', 'hours'},
M = {'minute', 'ମିନିଟminutes'},
S = {'ସେକେଣ୍ଡsecond', 'seconds'},
},
abbr_on = {
y = 'y',
m = 'ମାm',
w = 'w',
d = 'ଦିd',
H = 'h',
M = 'ମିm',
S = 'ସେs',
},
abbr_infant = { -- for {{age for infant}}
sep = '&nbsp;',
y = {'ବର୍ଷyr', 'yrs'},
m = {'ମାସmo', 'mos'},
w = {'ସପ୍ତାହwk', 'wks'},
d = {'ଦିନday', 'days'},
H = {'ଘଣ୍ଟାhr', 'hrs'},
M = {'ମିନିଟmin', 'mins'},
S = {'ସେକେଣ୍ଡsec', 'secs'},
},
abbr_raw = {},
Line ୮୦୪ ⟶ ୭୨୯:
flag = 'usesCurrent',
omitZero = true,
range = 'nodash',
},
age_full_years_nts = { -- {{age nts}}
Line ୧,୦୫୫ ⟶ ୯୮୦:
fmt_ymd = '%-Y-00-00'
end
local sortKey
local result = substituteParameters(
local sortable = translateParameters.sortable[args.sortable]
if sortable then
local value = (date1.partial and date1.partial.first or date1).jdz
sortKey = makeSort(value, sortable)
end
local result = (sortKey or '') .. substituteParameters(
mtext['txt-dda'],
date1:text(fmt_ymd),
"https://or.wikipedia.org/wiki/ମଡ୍ୟୁଲ:Age"ରୁ ଅଣାଯାଇଅଛି