1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
-- =======================================================
-- ****** Texts that appear in multiple help files *******
-- =======================================================
-- RST
-- global_helptexts.lua
-- --------------------
--
-- This file contains some default building helptexts that can be used when a more
-- specific help text hasn't been defined yet. It also contains some global time naming
-- functions for uniform translations.
-- RST
-- .. function:: no_lore_text_yet()
--
-- Returns a localized string for when no lore helptext has been defined yet.
-- :returns: _"Text needed"
--
function no_lore_text_yet()
-- TRANSLATORS: Lore helptext for a building - it hasn't been written yet.
return _"Text needed"
end
-- RST
-- .. function:: no_lore_author_text_yet()
--
-- Returns a localized string for when no lore author helptext has been defined yet.
-- :returns: _"Source needed"
--
function no_lore_author_text_yet()
-- TRANSLATORS: Lore author (source for a quote) helptext for a building - it hasn't been written yet.
return _"Source needed"
end
-- RST
-- .. function:: no_purpose_text_yet()
--
-- Returns a localized string for when no purpose helptext has been defined yet.
-- :returns: _"Text needed"
--
function no_purpose_text_yet()
-- TRANSLATORS: Purpose helptext for a building - it hasn't been written yet.
return _"Text needed"
end
-- RST
-- .. function:: no_performance_text_yet()
--
-- Returns a localized string for when no performance helptext has been defined yet.
-- :returns: _"Calculation needed"
--
function no_performance_text_yet()
-- TRANSLATORS: Performance helptext for a building - it hasn't been written yet.
return _"Calculation needed"
end
-- RST
-- .. function:: format_seconds(seconds)
--
-- :arg seconds: number of seconds
-- :type seconds: An unsigned integer
--
-- Returns a localized string to tell the time in seconds with the proper plural form.
-- :returns: "1 second", or "20 seconds" etc.
--
function format_seconds(seconds)
return ngettext("%d second", "%d seconds", seconds):bformat(seconds)
end
-- RST
-- .. function:: format_minutes(minutes)
--
-- :arg minutes: number of minutes
-- :type minutes: An unsigned integer
--
-- Returns a localized string to tell the time in minutes with the proper plural form.
-- :returns: "1 minute", or "20 minutes" etc.
--
function format_minutes(minutes)
return ngettext("%d minute", "%d minutes", minutes):bformat(minutes)
end
-- RST
-- .. function:: format_minutes_seconds(minutes, seconds)
--
-- :arg minutes: number of minutes
-- :type minutes: An unsigned integer
-- :arg seconds: number of seconds
-- :type seconds: An unsigned integer
--
-- Returns a localized string to tell the time in minutes and seconds with the proper plural form.
-- :returns: "1 minute and 20 seconds" etc.
--
function format_minutes_seconds(minutes, seconds)
return _("%1% and %2%"):bformat(
ngettext("%d minute", "%d minutes", minutes):bformat(minutes),
ngettext("%d second", "%d seconds", seconds):bformat(seconds)
)
end
|