InodeLabs/fern
1
12
Fork
You've already forked fern
1

i18n: fix most missing translatable strings #18

Open
zyga wants to merge 9 commits from zyga/fern:tweak/pl into main
pull from: zyga/fern:tweak/pl
merge into: InodeLabs:main
InodeLabs:main
Contributor
Copy link

This makes the help screen, the search screen and settings screen mostly translated now. There's a few outliers for what is effectively a setting value that is currently difficult to translate.

Overall from l10n point of view the only major thing missing, in my opinion, is support for automatically selecting the system language under a special "default" value. I may do that later this week.

This makes the help screen, the search screen and settings screen mostly translated now. There's a few outliers for what is effectively a setting value that is currently difficult to translate. Overall from l10n point of view the only major thing missing, in my opinion, is support for automatically selecting the system language under a special "default" value. I may do that later this week.
Those include SettingsBool, SettingsWeekStart, JournalPeriods,
SearchModal, HelpActions, HelpKeys, and Type verb.
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
snap: add Polish translations to .desktop file
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
daf6f98422
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>

@zyga There's a lint error (unused param) that'll need to get fixed:

+ golangci-lint run ./...
internal/tui/settingseditor/settingseditor.go:141:35: initBoolRow - cfg is unused (unparam)
func initBoolRow(row *settingRow, cfg *config.Config) {
 ^
@zyga There's a lint error (unused param) that'll need to get fixed: ``` + golangci-lint run ./... internal/tui/settingseditor/settingseditor.go:141:35: initBoolRow - cfg is unused (unparam) func initBoolRow(row *settingRow, cfg *config.Config) { ^ ```

@zyga RE: "support for automatically selecting the system language under a special "default" value"

If you look in ./internal/tui/app.go, the NewApp function, lines 201-203 deal with checking if the Config.Language field is set and tries to get the OS Language if not. On lines 204-206, if the OS language is not one of the supported locales it falls back to English.

@zyga RE: "support for automatically selecting the system language under a special "default" value" If you look in `./internal/tui/app.go`, the `NewApp` function, lines 201-203 deal with checking if the `Config.Language` field is set and tries to get the OS Language if not. On lines 204-206, if the OS language is not one of the supported locales it falls back to English.
zyga force-pushed tweak/pl from daf6f98422
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to 44a222c3c1
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2026年06月12日 18:57:25 +02:00
Compare
Author
Contributor
Copy link

@bugwhisperer I force pushed with the leftover argument removed. Thank you for pointing out language defaults, I didn't notice that.

@bugwhisperer I force pushed with the leftover argument removed. Thank you for pointing out language defaults, I didn't notice that.
bugwhisperer left a comment
Copy link

@zyga Thanks for your hard work to expand the i18n capabilities! ❤️ Overall, the code is looking good. I left a few comments for one small change with some repeated logic and a suggestion for the fix needed to get the gocyclo complexity down to under 15 for CI checks to pass.

@zyga Thanks for your hard work to expand the i18n capabilities! ❤️ Overall, the code is looking good. I left a few comments for one small change with some repeated logic and a suggestion for the fix needed to get the gocyclo complexity down to under 15 for CI checks to pass.
@ -338,3 +359,1 @@
}
ifcur=="true"{
row.draft="false"
ifrow.draft==row.boolTrue{

@zyga The gocyclo CI check fails due to the expanded if/else branching here. We could break out some or all of the newly added logic into a helper function.

@zyga The `gocyclo` CI check fails due to the expanded if/else branching here. We could break out some or all of the newly added logic into a helper function.
@ -137,0 +142,4 @@
tb:=lang.T().SettingsBool
ifrow.current=="true"{
row.tomlVal="true"
row.boolTrue=tb.True

@zyga Only row.tomlVal and row.current actually change between the row.current == "true" branch here and the else branch below. We should move

row.boolTrue=tb.Truerow.boolFalse=tb.False

up to before the if statement start and remove the repeated assignments from the else portion.

@zyga Only `row.tomlVal` and `row.current` actually change between the `row.current == "true"` branch here and the `else` branch below. We should move ```go row.boolTrue = tb.True row.boolFalse = tb.False ``` up to before the if statement start and remove the repeated assignments from the `else` portion.
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
This pull request has changes conflicting with the target branch.
  • internal/i18n/i18n.go
  • internal/i18n/locales/en.toml
  • internal/tui/app_render.go
  • internal/tui/searchmodal/searchmodal.go
  • internal/tui/settingseditor/settingseditor.go
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u tweak/pl:zyga-tweak/pl
git switch zyga-tweak/pl

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff zyga-tweak/pl
git switch zyga-tweak/pl
git rebase main
git switch main
git merge --ff-only zyga-tweak/pl
git switch zyga-tweak/pl
git rebase main
git switch main
git merge --no-ff zyga-tweak/pl
git switch main
git merge --squash zyga-tweak/pl
git switch main
git merge --ff-only zyga-tweak/pl
git switch main
git merge zyga-tweak/pl
git push origin main
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
InodeLabs/fern!18
Reference in a new issue
InodeLabs/fern
No description provided.
Delete branch "zyga/fern:tweak/pl"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?