Skip to content

Commit

Permalink
fix: Fix country mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
korapp committed May 8, 2024
1 parent d08efbe commit 105fcd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plasmoid/contents/code/countries.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion plasmoid/contents/ui/NordVPN.qml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ Item {

// Format NordVPN names
function prettyName(name) {
return name && name.replace(/_/g, ' ');
const minorWords = ['And', 'Of']
return name.split('_').map(w => minorWords.includes(w)
? w.toLowerCase()
: w.replace(/[a-z].+[A-Z]/g, x => x.toLowerCase())
).join(' ')
}

// Format NordVPN id
Expand Down

0 comments on commit 105fcd3

Please sign in to comment.