Module talk:I18n/complex date: Difference between revisions

Content deleted Content added
Error at Olhadoko erreka: at least one code path that doesn't execute
Line 3:
[[User:Plaba123|Plaba123]] ([[User talk:Plaba123|talk]]) 18:58, 21 November 2018 (UTC)
: That's because {{ping|Jarekt}} synced this with Commons, but {{ping|Pppery}} made a breaking change by [[Wikipedia:Templates_for_discussion/Log/2018_October_5#Module:Linguistic|RfD'ing]] [[Module:Linguistic]]. Not sure how to resolve that... Thanks. [[User:Mike Peel|Mike Peel]] ([[User talk:Mike Peel|talk]]) 21:04, 21 November 2018 (UTC)
::It amusingly highlights that we have at least one code path that is not executed as otherwise we would have had similar errors already, and I think I saw a few others of similar sort reviewing the module earlier:<sourcehighlightsyntaxhighlight lang=lua>if state.precision > 10 then -- precision > month
return 'du $date1 au $date2'
else -- "DE septebmbre" / "D'octobre"
return require("Module:Linguistic").of(date1, 'fr') .. " à $date2"
end</sourcehighlightsyntaxhighlight> --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 21:39, 21 November 2018 (UTC)