Skip to content

Commit 0012bec

Browse files
authored
Merge pull request #971 from synonymdev/fix/support-copyright-year
fix: localize copyright year
2 parents 895cee1 + 9ff0270 commit 0012bec

4 files changed

Lines changed: 19 additions & 9 deletions

File tree

.agents/commands/pr.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ gh pr create --base $base --title "..." --body "..." [--draft]
227227
- Instruct the user to drag-and-drop each media file into the Preview section via the GitHub web UI
228228
- Note: GitHub does not support programmatic media upload to PR bodies
229229

230-
### 8b. Backfill Changelog PR Number
230+
### 8b. Changelog Fragments
231231

232-
If the PR was created (not dry run) and `CHANGELOG.md` was modified in the branch (`git diff $base...HEAD --name-only | grep CHANGELOG.md`):
233-
- Read `CHANGELOG.md` and scan `## [Unreleased]` entries for lines missing a `#NUMBER` suffix
234-
- Append the actual PR number to those entries, e.g. `- Add foo` becomes `- Add foo #123`
235-
- If any entries were updated, create a new commit with message `chore: backfill changelog pr number` and push
232+
If the PR is user-facing, verify the branch adds exactly one changelog fragment under `changelog.d/next/` or `changelog.d/hotfix/`.
233+
Do not edit `CHANGELOG.md` in normal PRs.
234+
If the PR was created (not dry run), rename any new changelog fragment whose filename does not start with the actual PR number to `<PR_NUMBER>.<category>.md`, preserving the category (`added`, `changed`, `deprecated`, `removed`, `fixed`, or `security`).
235+
If any fragment was renamed, create a follow-up commit with message `chore: rename changelog fragment` and push it.
236236

237237
### 9. Output Summary
238238

app/src/main/java/to/bitkit/ui/settings/support/SupportScreen.kt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import androidx.compose.ui.unit.dp
4343
import androidx.core.net.toUri
4444
import androidx.lifecycle.compose.collectAsStateWithLifecycle
4545
import androidx.navigation.NavController
46+
import java.time.LocalDate
4647
import to.bitkit.BuildConfig
4748
import to.bitkit.R
4849
import to.bitkit.env.Env
@@ -66,6 +67,8 @@ import to.bitkit.ui.theme.AppThemeSurface
6667
import to.bitkit.ui.theme.Colors
6768

6869
private const val DEV_MODE_TAP_THRESHOLD = 5
70+
private const val COPYRIGHT_YEAR_PLACEHOLDER = "{year}"
71+
private const val COPYRIGHT_YEAR_TOKEN = "2025"
6972

7073
@Composable
7174
fun SupportScreen(
@@ -142,6 +145,10 @@ private fun Content(
142145
onClickVersion: () -> Unit = {},
143146
) {
144147
val appVersion = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
148+
val currentYear = remember { LocalDate.now().year.toString() }
149+
val copyrightText = stringResource(R.string.settings__support__copyright)
150+
.replace(COPYRIGHT_YEAR_PLACEHOLDER, currentYear)
151+
.replace(COPYRIGHT_YEAR_TOKEN, currentYear)
145152

146153
Column(
147154
modifier = Modifier
@@ -219,13 +226,15 @@ private fun Content(
219226

220227
FillHeight()
221228

222-
SupportFooter()
229+
SupportFooter(copyrightText = copyrightText)
223230
}
224231
}
225232
}
226233

227234
@Composable
228-
private fun SupportFooter() {
235+
private fun SupportFooter(
236+
copyrightText: String,
237+
) {
229238
// Bitkit logo with diagonal orange crossing through it
230239
Box(
231240
modifier = Modifier
@@ -269,7 +278,7 @@ private fun SupportFooter() {
269278
VerticalSpacer(16.dp)
270279

271280
BodyM(
272-
text = stringResource(R.string.settings__support__copyright),
281+
text = copyrightText,
273282
color = Colors.White64,
274283
)
275284

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@
888888
<string name="settings__support__report">Report Issue</string>
889889
<string name="settings__support__report_text">Please describe the issue you are experiencing or ask a general question.</string>
890890
<string name="settings__support__status">App Status</string>
891-
<string name="settings__support__copyright">Bitkit was crafted by Synonym Software, S.A. DE C.V. ©2025. All rights reserved.</string>
891+
<string name="settings__support__copyright">Bitkit was crafted by Synonym Software, S.A. DE C.V. ©{year}. All rights reserved.</string>
892892
<string name="settings__support__text">Need help? Report your issue from within Bitkit or visit our help center.</string>
893893
<string name="settings__support__text_button">Send</string>
894894
<string name="settings__support__text_success">Thank you for contacting us! We will try to get back to you as soon as possible.</string>

changelog.d/next/971.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The Support page now shows the current copyright year automatically.

0 commit comments

Comments
 (0)