A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: broken translations in status bar settings (#1188)

## Summary

* **What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)

The strings for `Show` and `Hide` were always showing in English,
regardless of which language was selected.

* **What changes are included?**

Replace the variables in the lambda by direct calls to the `tr` macro

## Additional Context

* Add any other information that might be helpful for the reviewer
(e.g., performance implications, potential risks,
specific areas to focus on).

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**<NO >**_

authored by

ariel-lindemann and committed by
GitHub
451774dd 8c279389

+4 -7
+4 -7
src/activities/settings/StatusBarSettingsActivity.cpp
··· 28 28 constexpr int TITLE_ITEMS = 3; 29 29 const StrId titleNames[TITLE_ITEMS] = {StrId::STR_BOOK, StrId::STR_CHAPTER, StrId::STR_HIDE}; 30 30 31 - const char* translatedShow = tr(STR_SHOW); 32 - const char* translatedHide = tr(STR_HIDE); 33 - 34 31 const int widthMargin = 10; 35 32 const int verticalPreviewPadding = 50; 36 33 const int verticalPreviewTextPadding = 40; ··· 135 132 [this](int index) { 136 133 // Draw status for each setting 137 134 if (index == 0) { 138 - return SETTINGS.statusBarChapterPageCount ? translatedShow : translatedHide; 135 + return SETTINGS.statusBarChapterPageCount ? tr(STR_SHOW) : tr(STR_HIDE); 139 136 } else if (index == 1) { 140 - return SETTINGS.statusBarBookProgressPercentage ? translatedShow : translatedHide; 137 + return SETTINGS.statusBarBookProgressPercentage ? tr(STR_SHOW) : tr(STR_HIDE); 141 138 } else if (index == 2) { 142 139 return I18N.get(progressBarNames[SETTINGS.statusBarProgressBar]); 143 140 } else if (index == 3) { ··· 145 142 } else if (index == 4) { 146 143 return I18N.get(titleNames[SETTINGS.statusBarTitle]); 147 144 } else if (index == 5) { 148 - return SETTINGS.statusBarBattery ? translatedShow : translatedHide; 145 + return SETTINGS.statusBarBattery ? tr(STR_SHOW) : tr(STR_HIDE); 149 146 } else { 150 - return translatedHide; 147 + return tr(STR_HIDE); 151 148 } 152 149 }, 153 150 true);