יחידה:PropertyLink: הבדלים בין גרסאות בדף
מ שינוי להצגת הפריטים המתורגמים, תוך ציון שיש עוד פרטים שטרם תורגמו |
|||
| שורה 292: | שורה 292: | ||
if (not propertyVals) or (#propertyVals==0) then return end --no such property for this item | if (not propertyVals) or (#propertyVals==0) then return end --no such property for this item | ||
local resTable = {} | local resTable = {} | ||
local missingTranslation = | local missingTranslation = 0 | ||
local hasFallbackTransation = false | local hasFallbackTransation = false | ||
for i, property in ipairs(propertyVals) do | for i, property in ipairs(propertyVals) do | ||
| שורה 318: | שורה 318: | ||
table.insert(resTable, formattedValue) | table.insert(resTable, formattedValue) | ||
else | else | ||
missingTranslation = | missingTranslation = missingTranslation + 1 | ||
end | end | ||
elseif propValue['type'] == 'string' then | elseif propValue['type'] == 'string' then | ||
| שורה 391: | שורה 391: | ||
end | end | ||
if missingTranslation then | if missingTranslation > 0 then | ||
if missingTranslation == 1 then | |||
table.insert(resTable, 'בפסקה זו רשומה אחת שטרם תורגמה') | |||
else | |||
table.insert(resTable, 'בפסקה זו '..missingTranslation..' רשומות שטרם תורגמו') | |||
end | |||
end | |||
-- bidi isolation - properly show mix or RTL and LTR statements | -- bidi isolation - properly show mix or RTL and LTR statements | ||
| שורה 410: | שורה 416: | ||
result = table.concat( resTable, options['seperator'] ) | result = table.concat( resTable, options['seperator'] ) | ||
end | end | ||
if hasFallbackTransation then | if hasFallbackTransation or (missingTranslation > 0 ) then | ||
result = result .. missingLabelCategory( propertyName ) | result = result .. missingLabelCategory( propertyName ) | ||
end | end | ||