@@ -56,7 +56,7 @@ defmodule LocalizePad.Lexicon do
5656 | :of_reversed
5757 | :per_reversed
5858
59- @ type aggregate :: :sum | :average | :median
59+ @ type aggregate :: :sum | :average | :median | :count | :minimum | :maximum
6060
6161 @ type deictic ::
6262 :now | :today | :tomorrow | :yesterday | :day_after_tomorrow | :day_before_yesterday
@@ -246,31 +246,51 @@ defmodule LocalizePad.Lexicon do
246246 # Spanish is the reminder that these are near neighbours in every language:
247247 # `media` is the average and `mediana` is the median, one letter apart and
248248 # two different answers.
249+ #
250+ # `min` is also the abbreviation for a minute, so a line reading nothing but
251+ # `min` answers the smallest entry above it rather than one minute. Only a
252+ # line that is *entirely* the word is read this way — `5 min` is still five
253+ # minutes — and nobody writes a bare `min` meaning a duration.
249254 @ aggregates % {
250255 en: % {
251256 sum: [ "sum" , "subtotal" , "total" ] ,
252257 average: [ "average" , "avg" , "mean" ] ,
253- median: [ "median" ]
258+ median: [ "median" ] ,
259+ count: [ "count" ] ,
260+ minimum: [ "min" , "minimum" , "lowest" , "smallest" ] ,
261+ maximum: [ "max" , "maximum" , "highest" , "largest" ]
254262 } ,
255263 de: % {
256264 sum: [ "summe" , "zwischensumme" , "gesamt" , "gesamtsumme" , "total" ] ,
257265 average: [ "durchschnitt" , "mittelwert" , "mittel" ] ,
258- median: [ "median" , "zentralwert" ]
266+ median: [ "median" , "zentralwert" ] ,
267+ count: [ "anzahl" ] ,
268+ minimum: [ "min" , "minimum" , "kleinster wert" ] ,
269+ maximum: [ "max" , "maximum" , "größter wert" , "grösster wert" ]
259270 } ,
260271 fr: % {
261272 sum: [ "somme" , "sous-total" , "total" ] ,
262273 average: [ "moyenne" ] ,
263- median: [ "médiane" , "mediane" ]
274+ median: [ "médiane" , "mediane" ] ,
275+ count: [ "compte" , "nombre" ] ,
276+ minimum: [ "min" , "minimum" ] ,
277+ maximum: [ "max" , "maximum" ]
264278 } ,
265279 es: % {
266280 sum: [ "suma" , "subtotal" , "total" ] ,
267281 average: [ "promedio" , "media" ] ,
268- median: [ "mediana" ]
282+ median: [ "mediana" ] ,
283+ count: [ "cuenta" , "recuento" ] ,
284+ minimum: [ "min" , "mínimo" , "minimo" ] ,
285+ maximum: [ "max" , "máximo" , "maximo" ]
269286 } ,
270287 ja: % {
271288 sum: [ "合計" , "小計" , "計" ] ,
272289 average: [ "平均" , "平均値" ] ,
273- median: [ "中央値" , "メジアン" ]
290+ median: [ "中央値" , "メジアン" ] ,
291+ count: [ "件数" , "個数" , "カウント" ] ,
292+ minimum: [ "最小" , "最小値" ] ,
293+ maximum: [ "最大" , "最大値" ]
274294 }
275295 }
276296
@@ -285,7 +305,8 @@ defmodule LocalizePad.Lexicon do
285305
286306 ### Returns
287307
288- * `{:ok, function}` where function is `:sum`, `:average` or `:median`.
308+ * `{:ok, function}` where function is `:sum`, `:average`, `:median`,
309+ `:count`, `:minimum` or `:maximum`.
289310
290311 * `:error` when the word names no function in this locale, which is what
291312 makes `somme` a calculation on a French sheet and prose on an English one.
0 commit comments