gitoria

calendar

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitfff2f537fff2f537Merge branch 'calendar31-lib' into mainAtlasfff2f537/lib/names.hl

2.5 KB

  1. // names.hl — month and weekday names for the languages the server can write itself (the server has no Intl): the first
  2. // language of the request's Accept-Language header. Same names as the browser's Intl gives (long month, short weekday).
  3. // Any other language → null: the month view then shows neutral names until the browser fills in its own.
  4. static tables = {
  5. en = { months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], prev = 'Previous month', next = 'Next month' }
  6. de = { months = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], days = ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'], prev = 'Voriger Monat', next = 'Nächster Monat' }
  7. fr = { months = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], days = ['lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.', 'dim.'], prev = 'Mois précédent', next = 'Mois suivant' }
  8. es = { months = ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], days = ['lun', 'mar', 'mié', 'jue', 'vie', 'sáb', 'dom'], prev = 'Mes anterior', next = 'Mes siguiente' }
  9. it = { months = ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'], days = ['lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom'], prev = 'Mese precedente', next = 'Mese successivo' }
  10. nl = { months = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], days = ['ma', 'di', 'wo', 'do', 'vr', 'za', 'zo'], prev = 'Vorige maand', next = 'Volgende maand' }
  11. pt = { months = ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], days = ['seg.', 'ter.', 'qua.', 'qui.', 'sex.', 'sáb.', 'dom.'], prev = 'Mês anterior', next = 'Mês seguinte' }
  12. }
  13. // "de-DE,de;q=0.9,en;q=0.8" → 'de'; the first tag decides (browsers list their preferred language first)
  14. static primaryTag = (header) => {
  15. if (header == null || hlTypeName(header) != 'String') { return '' }
  16. first = header.split(',')[0].split(';')[0].trim().toLowerCase()
  17. return first.slice(0, 2)
  18. }
  19. // the table of the request's language, or null (unknown language, no header)
  20. static namesFor = (header) => {
  21. t = primaryTag(header)
  22. return tables[t]
  23. }

Branches

Latest commits

  • fff2f537Merge branch 'calendar31-lib' into mainAtlas
  • 07cde3dc|||PR keep worker records out of the repo; README vendor is day72Atlas
  • a753b0ab|||PR move shared calendar logic to libAtlas
  • b32a921dMerge branch 'vendor-day72' into mainAtlas
  • 60a0dd19|||PR Hybriel day72 (00c9dbb8) instead of the withdrawn day73Atlas
  • 53f5464dMerge branch 'calendar26-day73' into mainAtlas
  • 338499ec|||PR Keep reminder settings open during editing and rejected savesAtlas
  • ad9e8d59|||PR Use framework page and popover state, Hybriel day73Atlas
  • cab224a1Re-vendor calendar to verified Hybriel day73Atlas
  • f9b8f918Merge branch 'calendar-vendor-day61' into mainAtlas
  • 66341793|||PR Vendor Hybriel day61Atlas
  • 36fc596bMerge branch 'vendor-day59' into mainAtlas
  • b37cc1da|||PR Vendor Hybriel day59Atlas
  • 05665102Merge branch 'vendor-day56' into mainAtlas
  • 687296fb|||PR Vendor Hybriel day56Atlas
  • a6166d4eMerge branch 'hl-standard-3' into mainAtlas
  • 6d0eb3b0|||PR Calendar day add buttons only when signed in (Kunibert minor)Atlas
  • add4b499|||PR Make calendar day actions keyboard accessibleAtlas
  • 79e49b4dMerge branch 'hl-standard' into mainAtlas
  • e9fec7bb|||PR HL-STANDARD clean-up: typed parameters, plain locals, by-reference cacheAtlas