pub struct Locale {Show 16 fields
pub report_title: &'static str,
pub day_type_working: &'static str,
pub workday_length: &'static str,
pub header_day: &'static str,
pub header_start: &'static str,
pub header_end: &'static str,
pub header_hours: &'static str,
pub header_result: &'static str,
pub total_worked: &'static str,
pub comment: &'static str,
pub work_on_task: &'static str,
pub work_generic: &'static str,
pub break_label: &'static str,
pub months: [&'static str; 12],
pub weekdays: [&'static str; 7],
pub date_format: &'static str,
}Expand description
A complete set of localized strings for one language.
All fields are &'static str because the tables are compiled into the
binary. The work_on_task field contains a {task} placeholder that is
replaced with the actual task name at render time.
Fieldsยง
ยงreport_title: &'static strReport title shown in the merged header cell (e.g. โะััะตั ะทะฐ ะดะตะฝัโ).
day_type_working: &'static strLabel for a regular working day (e.g. โัะฐะฑะพัะธะนโ).
workday_length: &'static strCaption for the workday-length header cell.
header_day: &'static strColumn header spanning the start/end time columns (e.g. โะะตะฝัโ).
header_start: &'static strHeader for the interval start-time column.
header_end: &'static strHeader for the interval end-time column.
header_hours: &'static strHeader for the optional โhoursโ column.
header_result: &'static strHeader for the optional โresultโ column.
total_worked: &'static strLabel for the total worked-hours footer row.
comment: &'static strLabel preceding the free-form comment box.
work_on_task: &'static strWork description template; {task} is replaced with the task name.
work_generic: &'static strGeneric work label used when a task has no name.
break_label: &'static strLabel written for hours (or parts of hours) spent on a break/pause.
months: [&'static str; 12]Nominative month names, indexed 0 (January) through 11 (December).
weekdays: [&'static str; 7]Weekday names, indexed 0 (Monday) through 6 (Sunday).
date_format: &'static strchrono date format string used for the date header cell.
Implementationsยง
Sourceยงimpl Locale
impl Locale
Sourcepub fn for_language(language: Language) -> &'static Locale
pub fn for_language(language: Language) -> &'static Locale
Returns the static Locale table for the given language.
Sourcepub fn work_text(&self, task_name: &str) -> String
pub fn work_text(&self, task_name: &str) -> String
Builds a work description for a task name using the work_on_task
template, falling back to Locale::work_generic for empty names.