Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/kfileitemmodel.cpp
Show First 20 Lines • Show All 2041 Lines • ▼ Show 20 Line(s) | 2012 | if (currentDate.year() == fileDate.year() && | |||
---|---|---|---|---|---|
2042 | } | 2042 | } | ||
2043 | } else { | 2043 | } else { | ||
2044 | const QDate lastMonthDate = currentDate.addMonths(-1); | 2044 | const QDate lastMonthDate = currentDate.addMonths(-1); | ||
2045 | if (lastMonthDate.year() == fileDate.year() && | 2045 | if (lastMonthDate.year() == fileDate.year() && | ||
2046 | lastMonthDate.month() == fileDate.month()) { | 2046 | lastMonthDate.month() == fileDate.month()) { | ||
2047 | 2047 | | |||
2048 | if (daysDistance == 1) { | 2048 | if (daysDistance == 1) { | ||
2049 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | 2049 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | ||
2050 | "MMMM is full month name in current locale, and yyyy is " | 2050 | "MMMM is full month name in current locale, and yyyy is full year number." | ||
2051 | "full year number", "'Yesterday' (MMMM, yyyy)")); | 2051 | "Do not replace single quotes with other characters such as «...», otherwise the translation will break.", | ||
2052 | "'Yesterday' (MMMM, yyyy)")); | ||||
2052 | newGroupValue = i18nc("Can be used to script translation of " | 2053 | newGroupValue = i18nc("Can be used to script translation of " | ||
2053 | "\"'Yesterday' (MMMM, yyyy)\" with context @title:group Date", | 2054 | "\"'Yesterday' (MMMM, yyyy)\" with context @title:group Date", | ||
2054 | "%1", newGroupValue); | 2055 | "%1", newGroupValue); | ||
2055 | } else if (daysDistance <= 7) { | 2056 | } else if (daysDistance <= 7) { | ||
2056 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | 2057 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | ||
2057 | "The week day name: dddd, MMMM is full month name " | 2058 | "The week day name: dddd, MMMM is full month name " | ||
2058 | "in current locale, and yyyy is full year number", | 2059 | "in current locale, and yyyy is full year number", | ||
2059 | "dddd (MMMM, yyyy)")); | 2060 | "dddd (MMMM, yyyy)")); | ||
2060 | newGroupValue = i18nc("Can be used to script translation of " | 2061 | newGroupValue = i18nc("Can be used to script translation of " | ||
2061 | "\"dddd (MMMM, yyyy)\" with context @title:group Date", | 2062 | "\"dddd (MMMM, yyyy)\" with context @title:group Date", | ||
2062 | "%1", newGroupValue); | 2063 | "%1", newGroupValue); | ||
2063 | } else if (daysDistance <= 7 * 2) { | 2064 | } else if (daysDistance <= 7 * 2) { | ||
2064 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | 2065 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | ||
aacid: Sorry for being the most nitpicky person ever, should we include translatedFormat here (and the… | |||||
2065 | "MMMM is full month name in current locale, and yyyy is " | 2066 | "MMMM is full month name in current locale, and yyyy is full year number." | ||
2066 | "full year number", "'One Week Ago' (MMMM, yyyy)")); | 2067 | "Do not replace single quotes with other characters such as «...», otherwise the translation will break.", | ||
2068 | "'One Week Ago' (MMMM, yyyy)")); | ||||
2067 | newGroupValue = i18nc("Can be used to script translation of " | 2069 | newGroupValue = i18nc("Can be used to script translation of " | ||
2068 | "\"'One Week Ago' (MMMM, yyyy)\" with context @title:group Date", | 2070 | "\"'One Week Ago' (MMMM, yyyy)\" with context @title:group Date", | ||
2069 | "%1", newGroupValue); | 2071 | "%1", newGroupValue); | ||
2070 | } else if (daysDistance <= 7 * 3) { | 2072 | } else if (daysDistance <= 7 * 3) { | ||
2071 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | 2073 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | ||
2072 | "MMMM is full month name in current locale, and yyyy is " | 2074 | "MMMM is full month name in current locale, and yyyy is full year number." | ||
2073 | "full year number", "'Two Weeks Ago' (MMMM, yyyy)")); | 2075 | "Do not replace single quotes with other characters such as «...», otherwise the translation will break.", | ||
2076 | "'Two Weeks Ago' (MMMM, yyyy)")); | ||||
2074 | newGroupValue = i18nc("Can be used to script translation of " | 2077 | newGroupValue = i18nc("Can be used to script translation of " | ||
2075 | "\"'Two Weeks Ago' (MMMM, yyyy)\" with context @title:group Date", | 2078 | "\"'Two Weeks Ago' (MMMM, yyyy)\" with context @title:group Date", | ||
2076 | "%1", newGroupValue); | 2079 | "%1", newGroupValue); | ||
2077 | } else if (daysDistance <= 7 * 4) { | 2080 | } else if (daysDistance <= 7 * 4) { | ||
2078 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | 2081 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | ||
2079 | "MMMM is full month name in current locale, and yyyy is " | 2082 | "MMMM is full month name in current locale, and yyyy is full year number." | ||
2080 | "full year number", "'Three Weeks Ago' (MMMM, yyyy)")); | 2083 | "Do not replace single quotes with other characters such as «...», otherwise the translation will break.", | ||
2084 | "'Three Weeks Ago' (MMMM, yyyy)")); | ||||
2081 | newGroupValue = i18nc("Can be used to script translation of " | 2085 | newGroupValue = i18nc("Can be used to script translation of " | ||
2082 | "\"'Three Weeks Ago' (MMMM, yyyy)\" with context @title:group Date", | 2086 | "\"'Three Weeks Ago' (MMMM, yyyy)\" with context @title:group Date", | ||
2083 | "%1", newGroupValue); | 2087 | "%1", newGroupValue); | ||
2084 | } else { | 2088 | } else { | ||
2085 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | 2089 | newGroupValue = fileTime.toString(i18nc("@title:group Date: " | ||
2086 | "MMMM is full month name in current locale, and yyyy is " | 2090 | "MMMM is full month name in current locale, and yyyy is full year number." | ||
2087 | "full year number", "'Earlier on' MMMM, yyyy")); | 2091 | "Do not replace single quotes with other characters such as «...», otherwise the translation will break.", | ||
2092 | "'Earlier on' MMMM, yyyy")); | ||||
2088 | newGroupValue = i18nc("Can be used to script translation of " | 2093 | newGroupValue = i18nc("Can be used to script translation of " | ||
2089 | "\"'Earlier on' MMMM, yyyy\" with context @title:group Date", | 2094 | "\"'Earlier on' MMMM, yyyy\" with context @title:group Date", | ||
2090 | "%1", newGroupValue); | 2095 | "%1", newGroupValue); | ||
2091 | } | 2096 | } | ||
2092 | } else { | 2097 | } else { | ||
2093 | newGroupValue = fileTime.toString(i18nc("@title:group " | 2098 | newGroupValue = fileTime.toString(i18nc("@title:group " | ||
2094 | "The month and year: MMMM is full month name in current locale, " | 2099 | "The month and year: MMMM is full month name in current locale, " | ||
2095 | "and yyyy is full year number", "MMMM, yyyy")); | 2100 | "and yyyy is full year number", "MMMM, yyyy")); | ||
▲ Show 20 Lines • Show All 285 Lines • Show Last 20 Lines |
Sorry for being the most nitpicky person ever, should we include translatedFormat here (and the rest of the warning messages)?
Seems like it could be useful