Skip to content

Commit

Permalink
fix de locale, bump to 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Slackadays committed Jul 8, 2023
1 parent 1363e7d commit 263df73
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
#make a universal binary on macOS
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)

project(Clipboard LANGUAGES CXX C VERSION 0.8.0)
project(Clipboard LANGUAGES CXX C VERSION 0.8.1)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ $ alias cb='snap run clipboard'
### <img src="documentation/readme-assets/InstallManually.png" alt="Install Manually" height=25px />
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.

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

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`.
```bash
Expand Down
3 changes: 2 additions & 1 deletion app.getclipboard.Clipboard.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<screenshots>
<screenshot type="default">
<caption>An example of using Clipboard</caption>
<image type="source" width="1906" height="1010">https://raw.githubusercontent.com/Slackadays/Clipboard/0.8.0/documentation/readme-assets/CBDemo.png</image>
<image type="source" width="1906" height="1010">https://raw.githubusercontent.com/Slackadays/Clipboard/0.8.1/documentation/readme-assets/CBDemo.png</image>
</screenshot>
</screenshots>

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

<releases>
<release version="0.8.1" date="2023-07-08" />
<release version="0.8.0" date="2023-06-03" />
<release version="0.7.1" date="2023-05-10" />
</releases>
Expand Down
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: clipboard
version: "0.8.0"
version: "0.8.1"
summary: The ultimate clipboard manager for the terminal
description: |
The Clipboard Project is one of the most advanced clipboard managers ever.
Expand Down
34 changes: 17 additions & 17 deletions src/cb/src/locales/de_de.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ void setLanguageDE() {
did_action[Ignore] = "Ignoriert";
did_action[Search] = "Gesucht";

action_descriptions[Cut] = "";
// action_descriptions[Cut] = "";
action_descriptions[Copy] = "Kopiert Objekte in die Zwischenablage";
action_descriptions[Paste] = "";
action_descriptions[Clear] = "";
action_descriptions[Show] = "";
action_descriptions[Edit] = "";
action_descriptions[Add] = "";
action_descriptions[Remove] = "";
action_descriptions[Note] = "";
action_descriptions[Swap] = "";
action_descriptions[Status] = "";
action_descriptions[Info] = "";
action_descriptions[Load] = "";
action_descriptions[Import] = "";
action_descriptions[Export] = "";
action_descriptions[History] = "";
action_descriptions[Ignore] = "";
action_descriptions[Search] = "";
// action_descriptions[Paste] = "";
// action_descriptions[Clear] = "";
// action_descriptions[Show] = "";
// action_descriptions[Edit] = "";
// action_descriptions[Add] = "";
// action_descriptions[Remove] = "";
// action_descriptions[Note] = "";
// action_descriptions[Swap] = "";
// action_descriptions[Status] = "";
// action_descriptions[Info] = "";
// action_descriptions[Load] = "";
// action_descriptions[Import] = "";
// action_descriptions[Export] = "";
// action_descriptions[History] = "";
// action_descriptions[Ignore] = "";
// action_descriptions[Search] = "";
}
12 changes: 6 additions & 6 deletions src/cb/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ void setLocale() {
else if (locale.substr(0, 2) == "fr")
setLanguageFR();
else if (locale.substr(0, 2) == "de")
// setLanguageDE();
return;
setLanguageDE();
return;
}

void setClipboardAttributes() {
Expand Down Expand Up @@ -643,16 +643,16 @@ void setFlags() {
clipboard_entry = std::stoul(flag);
} catch (...) {}
if (flagIsPresent<bool>("-h") || flagIsPresent<bool>("help", "--")) {
auto longestAction = std::max_element(actions.begin(), actions.end(), [](const auto& a, const auto& b) { return a.size() < b.size(); })->size();
auto longestActionShortcut = std::max_element(action_shortcuts.begin(), action_shortcuts.end(), [](const auto& a, const auto& b) { return a.size() < b.size(); })->size();
auto longestAction = columnLength(*(std::max_element(actions.begin(), actions.end(), [](const auto& a, const auto& b) { return columnLength(a) < columnLength(b); })));
auto longestActionShortcut = columnLength(*std::max_element(action_shortcuts.begin(), action_shortcuts.end(), [](const auto& a, const auto& b) { return columnLength(a) < columnLength(b); }));
std::string actionsList;
for (int i = 0; i < actions.size(); i++) {
actionsList.append("[progress]โ”ƒ ")
.append(actions.at(i))
.append(", ")
.append(repeatString(" ", longestAction - actions.at(i).size()))
.append(repeatString(" ", longestAction - columnLength(actions.at(i))))
.append(action_shortcuts[static_cast<Action>(i)])
.append(repeatString(" ", longestActionShortcut - action_shortcuts[static_cast<Action>(i)].size()))
.append(repeatString(" ", longestActionShortcut - columnLength(action_shortcuts[static_cast<Action>(i)])))
.append("โ”‚ [help]")
.append(action_descriptions[static_cast<Action>(i)])
.append("[blank]\n");
Expand Down

0 comments on commit 263df73

Please sign in to comment.