Skip to content

Commit

Permalink
Merge branch 'dhis2:main' into amakomaya
Browse files Browse the repository at this point in the history
  • Loading branch information
rc-poudel authored Jun 24, 2024
2 parents c34decf + f287e8b commit 3ea01b9
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 336 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ yarn-error.log*

lib/

.d2
.d2
locales/
10 changes: 10 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
lang_map = fa_AF: prs, uz@Cyrl: uz_UZ_Cyrl, uz@Latn: uz_UZ_Latn

[o:hisp-uio:p:multi-calendar-dates:r:en-pot]
file_filter = i18n/<lang>.po
source_file = i18n/en.pot
source_lang = en
type = PO
minimum_perc = 0
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [1.2.1](https://github.com/dhis2/multi-calendar-dates/compare/v1.2.0...v1.2.1) (2024-06-24)


### Bug Fixes

* **translations:** sync translations from transifex (main) ([d9f6fd2](https://github.com/dhis2/multi-calendar-dates/commit/d9f6fd238b859afedd71d5feef0a3768eb00ef75))

# [1.2.0](https://github.com/dhis2/multi-calendar-dates/compare/v1.1.2...v1.2.0) (2024-06-24)


### Features

* add i18n/transifex support ([7c3d3af](https://github.com/dhis2/multi-calendar-dates/commit/7c3d3afe24ff230f8dba10021c0000a9981babfb))

## [1.1.2](https://github.com/dhis2/multi-calendar-dates/compare/v1.1.1...v1.1.2) (2024-06-17)


Expand Down
15 changes: 15 additions & 0 deletions i18n/en.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-06-24T08:00:25.810Z\n"
"PO-Revision-Date: 2024-06-24T08:00:25.811Z\n"

msgid "Bi-Week"
msgstr "Bi-Week"

msgid "Week"
msgstr "Week"
22 changes: 22 additions & 0 deletions i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Translators:
# Philip Larsen Donnelly, 2024
#
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2024-06-24T08:00:25.810Z\n"
"PO-Revision-Date: 2024-06-24 10:02+0000\n"
"Last-Translator: Philip Larsen Donnelly, 2024\n"
"Language-Team: French (https://app.transifex.com/hisp-uio/teams/100509/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"

msgid "Bi-Week"
msgstr "Bi-hebdomadaire"

msgid "Week"
msgstr "Semaine"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/multi-calendar-dates",
"version": "1.1.2",
"version": "1.2.1",
"license": "BSD-3-Clause",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -66,6 +66,7 @@
}
},
"dependencies": {
"@dhis2/d2-i18n": "^1.1.3",
"@js-temporal/polyfill": "0.4.3",
"classnames": "^2.3.2"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import i18n from '@dhis2/d2-i18n'
import { Temporal } from '@js-temporal/polyfill'
import { SupportedCalendar } from '../../types'
import { fromAnyDate, formatYyyyMmDD, padWithZeroes } from '../../utils/index'
Expand Down Expand Up @@ -183,7 +184,8 @@ const buildLabel: BuildLabelFunc = ({
}) => {
const { year, month, day } = date
const { year: nextYear, month: nextMonth, day: nextDay } = nextWeek
const prefix = periodType === 'BIWEEKLY' ? 'Bi-Week' : 'Week'
const prefix =
periodType === 'BIWEEKLY' ? i18n.t('Bi-Week') : i18n.t('Week')
const label = `${prefix} ${weekIndex} - ${year}-${padWithZeroes(
month
)}-${padWithZeroes(day)} - ${nextYear}-${padWithZeroes(
Expand Down
379 changes: 46 additions & 333 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 3ea01b9

Please sign in to comment.