Skip to content

Commit f70627d

Browse files
authored
Merge branch 'main' into fix/dish-pin-colour
2 parents 262dfe2 + 937c29d commit f70627d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/plugins/Attributions/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## unpublished
4+
5+
- Fix: There were incomplete changes regarding how to write current year and month references. They have been rolled back to `<YEAR>` and `<MONTH>` in both documentation and code.
6+
37
## 1.2.0
48

59
- Feature: Improved implementation to make plugin SPA-ready.

packages/plugins/Attributions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ All parameters are optional. However, setting neither `layerAttributions` nor `s
2828
| fieldName | type | description |
2929
| --------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
3030
| id | string | ID of service the attribution relates to. The text will only be shown when the layer is visible. |
31-
| title | string | Attribution text or localization key. May contain HTML. The tags `{{YEAR}}` and `{{MONTH}}` are translated to the current year or month respectively. |
31+
| title | string | Attribution text or localization key. May contain HTML. The tags `<YEAR>` and `<MONTH>` are translated to the current year or month respectively. |

packages/plugins/Attributions/src/utils/lib.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ function getVisibleAttributions(
8383
export function formatAttributionText(text: string): string {
8484
const now = new Date()
8585
return text
86-
.replaceAll('{{YEAR}}', now.getFullYear().toString())
87-
.replaceAll('{{MONTH}}', `${now.getMonth() + 1}`.padStart(2, '0'))
86+
.replaceAll('<YEAR>', now.getFullYear().toString())
87+
.replaceAll('<MONTH>', `${now.getMonth() + 1}`.padStart(2, '0'))
8888
}

0 commit comments

Comments
 (0)