diff --git a/Makefile b/Makefile index 054db9d..944d858 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,22 @@ all: install -install: - for i in po/*.po; do lang="$$(basename "$$i" .po)" && sudo mkdir -p $(DESTDIR)/usr/share/locale/"$$lang"/LC_MESSAGES/ && sudo msgfmt -o $(DESTDIR)/usr/share/locale/"$$lang"/LC_MESSAGES/rhino-pkg.mo po/"$$lang".po ; done - sudo install -Dm755 rhino-pkg -t $(DESTDIR)/usr/bin/ +# This checks to make sure that DESTDIR is defined before initiation the install. \ + if it is not, it informs the user they must define it and exits with an error code. +install:: +ifndef DESTDIR + @echo "There was no destination given for the install. Please rerun while setting the variable DESTDIR in the command line." + exit 1 +endif + +# Actually makes rhino-pkg, provided that DESTDIR is defined +install:: + mkdir -p $(DESTDIR)/usr/bin + mkdir -p $(DESTDIR)/usr/share/rhino-pkg/ +# Copies translation-tomls recursively. + cp -r ./translation-tomls $(DESTDIR)/usr/share/rhino-pkg +# Copies over rhino-pkg's nu-files + cp -r ./nu-files $(DESTDIR)/usr/share/rhino-pkg +# Sets up the usr/bin directory and symlinks the rhino-pkg executable into it as rhino-pkg and rpk + ln -sf /usr/share/rhino-pkg/nu-files/rhino-pkg $(DESTDIR)/usr/bin/rhino-pkg + ln -sf /usr/share/rhino-pkg/nu-files/rhino-pkg $(DESTDIR)/usr/bin/rpk + chmod -R 755 $(DESTDIR)/usr/ diff --git a/nu-files/commands/mod.nu b/nu-files/commands/mod.nu new file mode 100644 index 0000000..1094946 --- /dev/null +++ b/nu-files/commands/mod.nu @@ -0,0 +1,9 @@ +# As of nushell 0.89.0, for directory modules, +# all exported nu files must be listed in the mod.nu file as exports +export module rpk-cleanup.nu +export module rpk-install-or-remove.nu +export module rpk-search.nu +export module rpk-sync.nu +export module rpk-update.nu + +def main [] -> {} \ No newline at end of file diff --git a/nu-files/commands/rpk-cleanup.nu b/nu-files/commands/rpk-cleanup.nu new file mode 100644 index 0000000..474a0d8 --- /dev/null +++ b/nu-files/commands/rpk-cleanup.nu @@ -0,0 +1,25 @@ +export def main [promptless: bool = false] { + if (cmd-exist 'nala') { + ^sudo nala install --fix-broken + if $promptless { + ^sudo nala autoremove -y + } else { + ^sudo nala autoremove + } + } else { + ^sudo apt --fix-broken install + if $promptless { ^sudo apt auto-remove -y } else { ^sudo apt auto-remove } + } + if (cmd-exist 'flatpak') { + ^sudo flatpak repair + if $promptless { ^sudo flatpak uninstall --unused -y } else { ^sudo flatpak uninstall --unused } + } + if (cmd-exist 'snap') { + let snaps = (^snap list --all | detect columns) + for $pkg in $snaps { + if ($pkg.Notes) =~ "disabled" { + ^sudo snap remove $pkg.Name --revision=$pkg.Rev + } + } + } +} \ No newline at end of file diff --git a/nu-files/commands/rpk-install-or-remove.nu b/nu-files/commands/rpk-install-or-remove.nu new file mode 100644 index 0000000..19a6796 --- /dev/null +++ b/nu-files/commands/rpk-install-or-remove.nu @@ -0,0 +1,49 @@ +use "../helper-scripts/" [user-package-selection, translation-dir-path] + +export def main [install: bool = true] { + let input: table = $in + let user_input_ints = user-package-selection $input (if $install {"install"} else { "remove" }) + + $user_input_ints | each { |index| + let pkg = ($input | get $index | get package) + let provider = ($input | get $index | get provider) + + + #print $"Selecting '(ansi purple_bold)($pkg)(ansi reset)' from package manager '(ansi purple_bold)($provider)(ansi reset)'" + + if $install { + translation-dir-path | translate install-select {package: $pkg, manager: $provider, color: "magenta" } | print + } else { + translation-dir-path | translate remove-select {package: $pkg, manager: $provider, color: "magenta" } | print + } + + + let r_u_sure = translation-dir-path| translate ask.sure + let sure = (input --numchar 1 $"($r_u_sure) ") + + let no: bool = (($sure != "Y") and ($sure != "y")) + # let sure = (input $"Are you sure? \((ansi green_bold)y(ansi reset)/(ansi red_bold)N(ansi reset)\) ") + if $no { + translation-dir-path | translate skipping {package: $pkg, manager: $provider, color: "magenta"} | print + } else { + + if $install { + match ($provider) { + "pacstall" => (^pacstall -I $pkg), + "snap" => (^sudo snap install $pkg), + "apt" => (^sudo apt install $pkg -y), + "flatpak" => (^sudo flatpak install $pkg -y), + "zap" => (^sudo zap install $pkg -q) + } + } else { + match ($provider) { + "pacstall" => (^pacstall -R $pkg), + "snap" => (^sudo snap remove $pkg), + "apt" => (^sudo apt remove $pkg -y), + "flatpak" => (^sudo flatpak remove $pkg -y), + "zap" => (^sudo zap remove $pkg -q) + } + } + } + } +} \ No newline at end of file diff --git a/nu-files/commands/rpk-search.nu b/nu-files/commands/rpk-search.nu new file mode 100644 index 0000000..1923260 --- /dev/null +++ b/nu-files/commands/rpk-search.nu @@ -0,0 +1,164 @@ +use '../helper-scripts/' [cmd-exist, fetch-version, single-line-print, add-whitespace-until-string-length, translation-dir-path] + +const VERSION_SEARCH_WARN = 200; + +def search-apt [input: string, desc: bool] -> table { + if (cmd-exist 'apt-cache') { + let first_table = if $desc == true { + (^apt-cache search $input | lines | parse "{package} - {description}" | insert provider 'apt') + } else { + (^apt-cache search --names-only $input | lines | parse "{package} - {description}" | insert provider 'apt') + } + $first_table + } else { return [] } +} + +def search-pacstall [input: string] -> table { + if (cmd-exist 'pacstall') { + let pacstall = do { ^pacstall -S $input } | complete + return ($pacstall.stdout | ansi strip | lines | parse "{package} @ {repo}" | reject repo | insert description '' | insert provider 'pacstall') + # if ($result | is-empty) { + # print -n $"\e[A\e[K" + # } + } else { return [] } +} + +def search-flatpak [input: string, desc: bool] -> table { + if (cmd-exist 'flatpak') { + if $desc == true { + let flatpak = (^flatpak search $input --columns=application | lines | wrap 'package' | insert provider 'flatpak' | merge (^flatpak search $input --columns=description | lines | wrap 'description')) + if ($flatpak.package.0 == "No matches found") { return [] } else { return $flatpak } + } else { + let flatpak = (^flatpak search $input --columns=application | lines | wrap 'package' | insert provider 'flatpak' | insert description '') + if ($flatpak.package.0 == "No matches found") { return [] } else { return $flatpak } + } + } else {print 'flatpak not installed'; return [] } +} + +def search-snap [input: string] -> table { + if (cmd-exist 'snap') { + return (^snap search $input | detect columns | get Name | wrap 'package' | insert description '' | insert provider 'snap') + } else { return [] } +} + + + +def prune-search-table [prune_term: string] -> table { + let input_table: table = $in + let downcase_prune_term = ($prune_term |str downcase) + $input_table | filter { |row| (($row.package | into string | str downcase | str contains $downcase_prune_term) or ($row.description | into string | str downcase | str contains $downcase_prune_term))} +} + +export def main [input: string, desc: bool = false, extra_prune_terms: table = []] -> table { + translation-dir-path | translate searching.apt | print + # print "Searching apt…" + let apt = (search-apt $input $desc) + print -n $"\e[A\e[K" + # print "Searching Pacstall…" + translation-dir-path | translate searching.pacstall | print + let pacstall = (search-pacstall $input) + print -n $"\e[A\e[K" + # print "Searching flatpak…" + translation-dir-path | translate searching.flatpak | print + let flatpak = (search-flatpak $input $desc) + print -n $"\e[A\e[K" + # print "Searching snap…" + translation-dir-path | translate searching.snap | print + let snap = (search-snap $input) + print -n $"\e[A\e[K" + #print $extra_prune_terms + mut results = ($apt | append $pacstall | append $flatpak | append $snap ) + + #additional search terms management + mut search_term: string = $input + for i in 0..<($extra_prune_terms | length ) { + let prune_term: string = ($extra_prune_terms | select $i).0 + # prune the results based on other search terms + $results = ($results | prune-search-table $prune_term) + # making search terms into one string + $search_term += " " + $search_term += $prune_term + } + + + # print -n $"\e[A\e[K" + if ($results | is-empty) { + # print -e $"No packages found matching '($input)'!" + translation-dir-path | translate none-matching {search: $search_term, color: magenta } | print + exit 1 + } + let results_len = $results | length + + (translation-dir-path | translate found-matching {matches: $results_len, search: $search_term, color: magenta} ) + "\n" | print + # print $"Found packages matching '(ansi purple_bold)($input)(ansi reset)':\n" + + mut skip_version_search: bool = false + if $results_len > $VERSION_SEARCH_WARN { + let prompt = $"Search resulted in over ($VERSION_SEARCH_WARN) packages. Searching whether the packages are installed may take significant time. Would you like to skip this step? \(Y/n\)" + let skip = (input --numchar 1 $"($prompt) " | str downcase) + $skip_version_search = ($skip != "n") + } + $results = ($results | insert version '') + if not $skip_version_search { + let version_table = ($results | calc-version-numbers) + $results = ($results | merge $version_table) + } + #preparation for descriptions + mut longest_package_name_length = 0 + if true { + #find length of longest package name + for i in 0..<$results_len { + if (($results.package | select $i).0 | ansi strip | str length --grapheme-clusters) > $longest_package_name_length { + $longest_package_name_length = (($results.package | select $i).0 | ansi strip | str length --grapheme-clusters) + } + } + } + mut longest_version_length = 0 + if not $skip_version_search { + for i in 0..<$results_len { + if (($results.version |select $i).0 | ansi strip | str length --grapheme-clusters) > $longest_version_length { + $longest_version_length = (($results.version | select $i).0 | ansi strip | str length --grapheme-clusters) + } + } + } + mut count = 0 + # Loop over results + let result_max_digits: int = ($results_len | into string | str length --grapheme-clusters) + for $i in $results { + let style = match $i.provider { + "pacstall" => $"(ansi yellow_bold)", + "apt" => $"(ansi green_bold)", + "flatpak" => $"(ansi cyan_bold)", + "snap" => $"(ansi red_bold)", + + _ => $"(ansi white_bold)" + } + let number_label: string = ($"[($style)($count)(ansi reset)]:" | add-whitespace-until-string-length ( $result_max_digits + 4 )) + let package_label: string = ($"($i.package)" | add-whitespace-until-string-length ($longest_package_name_length + 1) ) + let version_label: string = ($i.version | add-whitespace-until-string-length ($longest_version_length + 1) ) + let provider_label: string = ($"\(($style)($i.provider)(ansi reset)\)" | add-whitespace-until-string-length 11 ) + if $desc { + + let description = $" ($i.description)" + if ($i.description | is-empty) { + single-line-print $"($number_label)($package_label)($version_label)($provider_label)" + } else { + single-line-print $"($number_label)($package_label)($version_label)($provider_label)($description)" + } + } else { + single-line-print $"($number_label)($package_label)($version_label)($provider_label)" + } + $count += 1 + } + + return $results +} + + +def calc-version-numbers [] -> table { + let packages_table = $in + print "Searching for if any of the packages are installed." + let versions = $packages_table | par-each -k { |row| ($row.package | fetch-version $row.provider) } + print -n $"\e[A\e[K" + $versions | wrap version +} \ No newline at end of file diff --git a/nu-files/commands/rpk-sync.nu b/nu-files/commands/rpk-sync.nu new file mode 100644 index 0000000..2468779 --- /dev/null +++ b/nu-files/commands/rpk-sync.nu @@ -0,0 +1,12 @@ +# Functions like the sync command for pacman +# Updates all repos that can update their repos +export def main [ ] { + if (cmd-exist 'nala') { + ^sudo nala update + } else { + ^sudo apt update + } + if (cmd-exist 'flatpak') { + ^flatpak update --appstream + } +} \ No newline at end of file diff --git a/nu-files/commands/rpk-update.nu b/nu-files/commands/rpk-update.nu new file mode 100644 index 0000000..9f4ae13 --- /dev/null +++ b/nu-files/commands/rpk-update.nu @@ -0,0 +1,32 @@ +export def main [promptless: bool = false] { + + let r_u_sure = translation-dir-path| translate ask.upgrade + let sure: string = (input --numchar 1 $"($r_u_sure)") + # let sure = (input $"Are you sure you want to update all packages? \((ansi green_bold)y(ansi reset)/(ansi red_bold)N(ansi reset)\) ") + let no: bool = (($sure != "Y") and ($sure != "y")) + if $no { + exit 1 + } + + if (cmd-exist 'nala') { + if $promptless { + ^sudo nala upgrade --full --no-autoremove -o Acquire::AllowReleaseInfoChange="true" -y + } else { + ^sudo nala upgrade --full --no-autoremove -o Acquire::AllowReleaseInfoChange="true" + } + } else { + ^sudo apt update --allow-releaseinfo-change + if $promptless { ^sudo apt upgrade -y } else { ^sudo apt upgrade } + } + if (cmd-exist 'pacstall') { + ^pacstall -U + if $promptless { ^pacstall -PUp } else { ^pacstall -Up } + } + if (cmd-exist 'flatpak') { + if $promptless { ^sudo flatpak update -y } else { ^sudo flatpak update } + } + if (cmd-exist 'snap') { + ^sudo snap refresh + } + +} \ No newline at end of file diff --git a/nu-files/helper-scripts/add-whitespace-until-string-length.nu b/nu-files/helper-scripts/add-whitespace-until-string-length.nu new file mode 100644 index 0000000..0da1eb9 --- /dev/null +++ b/nu-files/helper-scripts/add-whitespace-until-string-length.nu @@ -0,0 +1,14 @@ +#USAGE: adds whitespace to the end of a string $in until it is $length characters long +export def main [length: int, --front (-f)] -> string { + let input: string = $in + let amount = ($length - ($input | ansi strip | str length --grapheme-clusters)) + mut whitespace_string = $input + for _ in 0..<$amount { + if not $front { + $whitespace_string += " " + } else { + $whitespace_string = " " + $whitespace_string + } + } + $whitespace_string +} \ No newline at end of file diff --git a/nu-files/helper-scripts/cmd-exist.nu b/nu-files/helper-scripts/cmd-exist.nu new file mode 100644 index 0000000..bbb2628 --- /dev/null +++ b/nu-files/helper-scripts/cmd-exist.nu @@ -0,0 +1,4 @@ +export def main [input: string] -> bool { + let stuff = (which $input) + if ($stuff | is-empty) { return false } else if ($stuff).type.0 == "external" { return true } +} \ No newline at end of file diff --git a/nu-files/helper-scripts/fetch-version.nu b/nu-files/helper-scripts/fetch-version.nu new file mode 100644 index 0000000..9ea146d --- /dev/null +++ b/nu-files/helper-scripts/fetch-version.nu @@ -0,0 +1,85 @@ +use "./cmd-exist.nu" main + +export def main [manager: string] -> string { + let package: string = $in + if $manager == 'apt' { + return ($package | apt-fetch-version) + } else if $manager == 'pacstall' { + return ($package | pacstall-fetch-version) + } else if $manager == 'flatpak' { + return ($package | flatpak-fetch-version) + } else if $manager == 'snap' { + return ($package | snap-fetch-version) + } else { + return NO_VERSION_INSTALLED + } +} + +def NO_VERSION_INSTALLED [] -> string { + $"(ansi red_bold)✕(ansi reset)" +} + +def apt-fetch-version [] -> string { + let package: string = $in + let version = if (cmd-exist 'apt') { + let query_complete = do { ^dpkg-query --showformat='${Version}' --show $package } | complete + if $query_complete.exit_code == 0 { + let version = $query_complete.stdout + $"(ansi green_bold)($version)(ansi reset)" + } else { + NO_VERSION_INSTALLED + } + } else { + NO_VERSION_INSTALLED + } + + if ($version | ansi strip ) == "" { + $"(ansi yellow_bold)?(ansi reset)" + } else { + $version + } +} +def pacstall-fetch-version [] -> string { + let package: string = $in + if (cmd-exist 'pacstall') { + let qi_complete = do { ^pacstall -Qi $package version} | complete + if $qi_complete.stderr == "" { + $"(ansi green_bold)($qi_complete.stdout)(ansi reset)" + } else { + NO_VERSION_INSTALLED + } + } else { + NO_VERSION_INSTALLED + } + +} + +def flatpak-fetch-version [] -> string { + let package: string = $in + if (cmd-exist 'flatpak') { + let info_complete = do { ^flatpak info $package } | complete + if $info_complete.stderr == "" { + let version = $info_complete.stdout | lines | collect { |x| $x.7 | parse --regex '\s*Version: (?P.*)' | collect { |y| $y.version.0 }} + $"(ansi green_bold)($version)(ansi reset)" + } else { + NO_VERSION_INSTALLED + } + } else { + NO_VERSION_INSTALLED + } +} + +def snap-fetch-version [] -> string { + let package: string = $in + if (cmd-exist 'snap') { + let list_complete = do { ^snap list $package } | complete + if $list_complete.stderr == "" { + let version = $list_complete.stdout | lines | skip 1 | collect { |x| $x.0 | split row ' ' | collect { |y| $y.2}} + $"(ansi green_bold)($version)(ansi reset)" + } else { + NO_VERSION_INSTALLED + } + } else { + NO_VERSION_INSTALLED + } +} \ No newline at end of file diff --git a/nu-files/helper-scripts/get-install-dir.nu b/nu-files/helper-scripts/get-install-dir.nu new file mode 100644 index 0000000..14eaa44 --- /dev/null +++ b/nu-files/helper-scripts/get-install-dir.nu @@ -0,0 +1,47 @@ +export def main [] -> path { + + use ./raw-install-dir.nu + let rhino_pkg_path: string = ([ raw-install-dir, "nu-files/rhino-pkg"] | str join) + let rhino_pkg_exists: bool = ( $rhino_pkg_path | path exists) + + if $rhino_pkg_exists { + raw-install-dir + +# This code is a remnant of when I was making rhino-pkg check to see if the given path contained an outdated installation. +# In hindsight I decided that it would be wasting execution time +# let days_since_accessed: float = (((^date +%s | into int) - (^stat --format=%X rhino-pkg | into int)) | into float) / 86400.0 + + } else { + # gets the new dir from dpkg + let new_install_path: path = request-dpkg-for-install-path + # obtains the path of the raw-install-dir.nu file + let raw_install_dir_nu_path: path = ([$new_install_path, "nu-files/helper-scripts/raw-install-dir.nu"] | str join) + # opens raw-install-dir.nu + let old_raw_install_dir_nu = open $raw_install_dir_nu_path + # obtains the outdated dir + let old_line: string = ($old_raw_install_dir_nu| lines | get 1) + if ($old_line | str contains $new_install_path) { + # this only arises in the situation where rhino-pkg + # is running after already fixing the file but before exiting after fixing it + # (nushell doesn't update while running when its source is updated) + return $new_install_path + } + # creates the new line to replace the old one in raw-install-dir.nu + let new_line: string = (["\t", $new_install_path ] | str join ) + # creates a new version of raw-install-dir.nu with the updated path + let new_raw_install_dir_nu = $old_raw_install_dir_nu | str replace $old_line $new_line + # saves the updated version to the file + $new_raw_install_dir_nu | save -f $raw_install_dir_nu_path + + $new_install_path + + } + +} + +def request-dpkg-for-install-path [] -> path { +# this line of code asks dpkg for a list of all files that have been installed via the deb package rhino-pkg +# it filters in only the ones with the path "nu-files" and selects and single one. +# it then slices off the "nu-files" and everything after, in order to leave itself with the pure share dir for rhino-pkg. + (^dpkg -L rhino-pkg | lines | filter { |line| $line | str contains "nu-files"} | get 0 | split row "nu-files" | get 0) +} diff --git a/nu-files/helper-scripts/mod.nu b/nu-files/helper-scripts/mod.nu new file mode 100644 index 0000000..9a33754 --- /dev/null +++ b/nu-files/helper-scripts/mod.nu @@ -0,0 +1,10 @@ +# As of nushell 0.89.0, for directory modules, +# all exported nu files must be listed in the mod.nu file as exports +export module add-whitespace-until-string-length.nu +export module cmd-exist.nu +export module fetch-version.nu +export module single-line-print.nu +export module translation-dir-path.nu +export module user-package-selection.nu +export module get-install-dir.nu +def main [] -> {} \ No newline at end of file diff --git a/nu-files/helper-scripts/raw-install-dir.nu b/nu-files/helper-scripts/raw-install-dir.nu new file mode 100644 index 0000000..12f68f0 --- /dev/null +++ b/nu-files/helper-scripts/raw-install-dir.nu @@ -0,0 +1,4 @@ +export def main [] -> path { + '/usr/share/rhino-pkg/' +} +# this is an internal helper script for get-install-dir. use get-install-dir if you want the install dir. diff --git a/nu-files/helper-scripts/single-line-print.nu b/nu-files/helper-scripts/single-line-print.nu new file mode 100644 index 0000000..bbc039a --- /dev/null +++ b/nu-files/helper-scripts/single-line-print.nu @@ -0,0 +1,24 @@ +use "./cmd-exist.nu" * +#USAGE: restricts the string to a single line when it prints it +export def main [ input: any = ""] { + let pipeline: string = ($in | into string) + let output: string = ((($pipeline + ($input | into string)) | str replace "\n" " »|« ")) + let deansi_output = ($output | ansi strip) + let num_of_ansis: int = ($output | split row "\e" | length) - 1 + let ansi_char_difference: int = ($output | str length --grapheme-clusters) - ($deansi_output | str length --grapheme-clusters) + + mut terminal_width = 100; + if (cmd-exist 'tput') { + $terminal_width = ((tput cols) | into int) + } else if (cmd-exist 'stty') { + $terminal_width = ((stty size| split column " ").column2.0 | into int) + } + + if ($deansi_output | str length ) < ($terminal_width - 1) { + print $output + } else { + + (($output | str substring --grapheme-clusters 0..<(($terminal_width - 1) - 3 + $ansi_char_difference - ($num_of_ansis * 2))) + $"(ansi reset)...") | print + } + +} \ No newline at end of file diff --git a/nu-files/helper-scripts/translation-dir-path.nu b/nu-files/helper-scripts/translation-dir-path.nu new file mode 100644 index 0000000..b11dbeb --- /dev/null +++ b/nu-files/helper-scripts/translation-dir-path.nu @@ -0,0 +1,6 @@ +#returns the path to the translation-tomls dir +export def main [] -> string { + use ./get-install-dir.nu + let install_dir: path = get-install-dir + [ $install_dir , "translation-tomls"] | str join +} \ No newline at end of file diff --git a/nu-files/helper-scripts/user-package-selection.nu b/nu-files/helper-scripts/user-package-selection.nu new file mode 100644 index 0000000..5b99d48 --- /dev/null +++ b/nu-files/helper-scripts/user-package-selection.nu @@ -0,0 +1,36 @@ +use "./translation-dir-path.nu" main + +export def main [ input: table , purpose: string ] -> table { + mut user_input = "" + print "" + let input_final_index = ($input | length) - 1 + + $user_input = match $purpose { + "install" => (input (translation-dir-path| translate ask.which-install {index: $input_final_index}) | into string), + "info" => (input (translation-dir-path | translate ask.which-info{ index: $input_final_index }) |into string), + "remove" => (input (translation-dir-path| translate ask.which-remove {index: $input_final_index}) | into string), + _ => [] + } + + #uses regex to filter out non-number inputs, then converts to int + mut user_input_ints = ($user_input | split row ' ' | find --regex "[0-9]+" | find --regex "^[0-9]+" | into int) + + #screens the list for invalid indices + mut drop_list: list = [] + for i in 0..<($user_input_ints | length) { + if ($user_input_ints |select $i).0 > $input_final_index { + $drop_list = ($drop_list | append $i) + } + } + #prunes invalid indices + for i in 0..<($drop_list|length) { + $user_input_ints = ($user_input_ints | drop nth ($drop_list| select $i).0) + } + + #user provided no numbers that were valid + if ($user_input_ints | is-empty) { + let error_msg = translation-dir-path | translate invalid.integers {number: $input_final_index} + error make {msg: $error_msg} + } + $user_input_ints +} \ No newline at end of file diff --git a/nu-files/rhino-pkg b/nu-files/rhino-pkg new file mode 100644 index 0000000..b00bf32 --- /dev/null +++ b/nu-files/rhino-pkg @@ -0,0 +1,176 @@ +#!/usr/bin/nu + +use "./commands/" [rpk-cleanup, rpk-install-or-remove, rpk-search, rpk-sync, rpk-update] +use "./helper-scripts/" translation-dir-path +plugin use nu-tongues + +def search-cmd-no-args [ ] { + let command: string = $in + let error_msg = translation-dir-path | translate invalid.search-arguments {subcommand: $command} + error make -u {msg: $error_msg} + exit 1 +} + + +# USAGE: rpk [function] {flag} +# +# functions: +# install: Install package(s) - Prompts user to respond with +# the number(s) associated with the desired package(s). +# Aliases: nstl, instll, instl, add, i +# +# remove: Uninstall package(s) - Prompts user to respond with +# the number(s) associated with the desired package(s). +# Aliases: rm, rmv, uninstall, r +# +# search: Search for package(s) - Does not have a second prompt. +# Aliases: srch, find, s +# +# update: Updates all packages accessible to the wrapper - does +# not accept , instead use install to update +# individual packages. Has a confirmation prompt. +# Aliases: upgrade, updt, upd, upg, u +# +# cleanup: Attempts to repair broken dependencies and remove any +# unused packages. Does not accept , but has +# a confirmation prompt. +# Aliases: clean, clnp, cln, c +# +# flags: +# --help/-h: Display this page +# +# --multiterm For commands with package search functionality, switches them to accept multiple arguments as additional filtering on a single search +# +# --description/-d: By default, rpk will only display packages +# that contain within their name. Use this flag to increase +# range and display packages with in their description. +# +# -y: Makes functions with confirmation prompts run promptless. +# +# input: +# Provide a package name or description. +# +# Example execution: +# $ rpk install foobar +# Found packages matching: 'foobar': +# +# [0]: pyfoobar (apt) +# [1]: foobarshell (apt) +# [2]: foobar (flatpak) +# [3]: foobar-web (snap) +# [4]: foobar-bin (pacstall) +# [5]: foobar-theme (pacstall) +# +# Select which package to install [0-5]: 3 4 5 +# Selecting 'foobar-web' from package manager 'snap' +# Selecting 'foobar-bin' from package manager 'pacstall' +# Selecting 'foobar-theme' from package manager 'pacstall' +# Are you sure? (y/N) +# [...] +# +# .;:;,. .: +# 'coooooooo:oo.';. +# ,oooooooooooooooo ; +# clllcccllloooooooo;c:'o +# .;';:::::::::cclooooooo' +# ''',::::::::::::::ccclc. +# .''';::::::::::l::::::: +# '''',:::::::::kd. +# .''''',;::ck:oW; +# ''''''''kXOM. +# .,,:dXMK +# :k +# +# rpk 0.1.2 +# A package manager wrapper for Pacstall, APT, Flatpak and snap +# Developed by Elsie19 for +# the Rhino Linux distribution. +def main [ + --description (-d) # Increase range and display packages with in their description + --yes (-y) # Makes functions with confirmation prompts run promptless + --multiterm # Makes functions with search features use multiple terms, filtering by each term + ...rest: string # 'install', 'remove', 'search', 'update', 'cleanup', etc. +] -> int { + if ($rest | is-empty) { + let error_msg = translation-dir-path | translate invalid.no-subcommand + error make -u { msg: $error_msg} + exit 1 + } + + # alias catching + mut command = match ($rest.0 | str downcase) { + "install" | "instll" | "instl" | "add" | "nstl" | "i" => "install", + "remove" | "rmv" | "rm" | "uninstall" | "r" => "remove", + "search" | "srch" | "find" | "s" => "search", + "update" | "updt" | "upgrade" | "upd" | "upg" | "u" => "update", + "cleanup" | "clnp" | "cln" | "clean" | "c" => "cleanup", + "sync" | "refresh" | "rfrsh" | "S" => "sync" + _ => "invalid" + + } +# "info" | "information" | "data" | "query" | "qry" | "q" => "info", + if $command == "invalid" { + let error_msg = translation-dir-path | translate invalid.subcommand {subcommand: $rest.0} + error make -u { msg: $error_msg, } + } + + + + if $command == "install" { + if ($rest | length) < 2 { #install was called without a search term + $command | search-cmd-no-args + } else { + if $multiterm { + ((rpk-search $rest.1 $description ($rest | skip 2)) | rpk-install-or-remove true) + } else { + ($rest | skip 1) | each { |searchterm| + let search_results: table = (rpk-search $searchterm $description) + $search_results | rpk-install-or-remove true + } + } + } + } + if $command == "remove" { + if ($rest | length) < 2 { #remove was called without a search term + $command | search-cmd-no-args + } else { + if $multiterm { + (rpk-search $rest.1 $description ($rest | skip 2)) | rpk-install-or-remove false + } else { + ($rest | skip 1) | each { |searchterm| + let search_results = (rpk-search $searchterm $description) + $search_results | rpk-install-or-remove false + } + } + } + } + if $command == "search" { + if ($rest | length) < 2 { #search was called without a search term + $command | search-cmd-no-args + } else { + if $multiterm { + let search = (rpk-search $rest.1 $description ($rest | skip 2)) + } else { + ($rest | skip 1) | each { |searchterm| + (rpk-search $searchterm $description) + } + } + } + } + + #currently removed + if $command == "info" { + if ($rest | length) < 2 { #info was called without a search term + $command | search-cmd-no-args + } else { + (rpk-search $rest.1 $description ($rest | skip 2)) | info + } + } + + match $command { + "update" => (rpk-update $yes), + "cleanup" => (rpk-cleanup $yes) + "sync" => (rpk-sync ) + } + +} diff --git a/nu-files/wip.nu b/nu-files/wip.nu new file mode 100644 index 0000000..7c1757f --- /dev/null +++ b/nu-files/wip.nu @@ -0,0 +1,121 @@ +def all-installed-programs [] { + let apt_programs = if (cmd-exist 'apt') { + ^apt list --installed | lines | parse "{package}/{junk1} {version} {junk2}" | select package version + } else { + [] + } + let pacstall_programs = if (cmd-exist 'pacstall') { + + } +} + + + +def search-installed-apt [input: string, desc: bool] -> table { + if (cmd-exist 'apt') { + ^apt list --installed | lines | parse "{package}/{junk1} {version} {junk2}" | select package version | filter {|pkg| $pkg.package | str contains $input} + } else { + [] + } +} + +def link-install [input: string] -> { + +} + +def path-install [input: string] { + +} + +def deb-install [] { + let path: string = $in + if (cmd-exist 'apt') { + ^sudo apt install $path + } else { + # should be impossible + } +} + +def flatpakref-install [] { + let path: string = $in + if (cmd-exist 'flatpak') { + ^sudo flatpak install --from $path + } else { + # cannot install flatpaks because flatpak is not installed + } + +} + +def pacscript-install [] { + let path: string = $in + if (cmd-exist 'pacstall') { + ^sudo pacstall -I $path + } else { + # cannot install pacscript because Pacstall is not installed + } +} + + + + +#def test-install-apt [] -> table { +# let table_in: table = $in +# mut repo_table: table = ($table_in | insert installed $"(ansi red)\(none\)(ansi reset)") +# let installed_pkgs = ^apt list --installed | lines | parse "{name}/{remainder}" +# let repo_table_length = $table_in | length +# let installed_pkgs_length = $installed_pkgs | length +# +# for i: int in 0..$repo_table_length { +# let package = ($repo_table | select $i ).package.0 +# +# for j in 0..$installed_pkgs_length { +# let $inst_pkg = ($installed_pkgs | select $j).name +# #print $inst_pkg +# if $package == $inst_pkg { +# let policy_table = ^apt-cache policy $package | detect columns --skip 1 --no-headers +# $repo_table.$i.installed = $"(ansi green)\(($policy_table.column1.0)\)(ansi reset)" +# break +# } } +# } + +# repo_table + +#} + + + + +def search-installed-pacstall [input: string] -> table { + if (cmd-exist 'pacstall') { + ^pacstall -L | ansi strip | lines | filter {|pkg| $pkg.package | str contains $input} + } else { + [] + } +} + + +def search-installed-flatpak [input: string, desc: bool] -> table { + if (cmd-exist 'flatpak') { + + } else { + [] + } +} + + + +#def search-zap [search_term: string] { +# if (cmd-exist 'zap') { +# let all_zap_pkgs = ( http get "https://g.srev.in/get-appimage/index.min.json" | select name summary | rename package description | insert provider zap) +# $all_zap_pkgs | prune-search-table $search_term +# } else { [] } +#} + + + + + +def info [ ] { + let input: table = $in + let user_input_ints = user-package-selection $input "info" +} diff --git a/rhino-pkg b/rhino-pkg index 8dfc456..f7564d0 100755 --- a/rhino-pkg +++ b/rhino-pkg @@ -1,428 +1,540 @@ -#!/bin/bash - -tabs -4 - -export TEXTDOMAIN=rhino-pkg -if [[ -n $RHINOPKG_DEBUG ]]; then - export TEXTDOMAINDIR="${PWD}/locale" -else - export TEXTDOMAINDIR=/usr/share/locale -fi - -# Colors -if [[ -z $NO_COLOR ]]; then - export NC=$'\033[0m' - export BGreen=$'\033[1;32m' - export BCyan=$'\033[1;36m' - export BYellow=$'\033[1;33m' - export BPurple=$'\033[1;35m' - export BRed=$'\033[1;31m' - export BWhite=$'\033[1;37m' - export c1=$'\u001b[38;5;104m' # light purple - export c2=$'\u001b[0m' # white/reset - export c3=$'\u001b[38;5;55m' # dark purple - export c4=$'\u001b[38;5;98m' # medium purple -fi - -help_flag="USAGE: $(basename $0) [function] {flag} - -functions: - install: Install package(s) - Prompts user to respond with - the number(s) associated with the desired package(s). - - remove: Uninstall package(s) - Prompts user to respond with - the number(s) associated with the desired package(s). - - search: Search for package(s) - Does not have a second prompt. - - update: Updates all packages accessible to the wrapper - does - not accept , instead use install to update - individual packages. Has a confirmation prompt. +#!/usr/bin/env nu +def translation-dir-path [] -> string { + "/usr/src/pacstall/rhino-pkg/translation_tomls/" +} + +def cmd-exist [input: string] -> bool { + let stuff = (which $input) + if ($stuff | is-empty) { return false } else if ($stuff).type.0 == "external" { return true } +} - cleanup: Attempts to repair broken dependencies and remove any - unused packages. Does not accept , but has - a confirmation prompt. +def search-apt [input: string, desc: bool] -> table { + if (cmd-exist 'apt-cache') { + let first_table = if $desc == true { + (^apt-cache search $input | lines | parse "{package} - {description}" | insert provider 'apt') + } else { + (^apt-cache search --names-only $input | lines | parse "{package} - {description}" | insert provider 'apt') + } + $first_table + } else { return [] } +} +#def test-install-apt [] -> table { +# let table_in: table = $in +# mut repo_table: table = ($table_in | insert installed $"(ansi red)\(none\)(ansi reset)") +# let installed_pkgs = ^apt list --installed | lines | parse "{name}/{remainder}" +# let repo_table_length = $table_in | length +# let installed_pkgs_length = $installed_pkgs | length +# +# for i: int in 0..$repo_table_length { +# let package = ($repo_table | select $i ).package.0 +# +# for j in 0..$installed_pkgs_length { +# let $inst_pkg = ($installed_pkgs | select $j).name +# #print $inst_pkg +# if $package == $inst_pkg { +# let policy_table = ^apt-cache policy $package | detect columns --skip 1 --no-headers +# $repo_table.$i.installed = $"(ansi green)\(($policy_table.column1.0)\)(ansi reset)" +# break +# } } + + + + +# } + +# repo_table + +#} + +def prune-search-table [prune_term: string] -> table { + let input_table: table = $in + let downcase_prune_term = ($prune_term |str downcase) + $input_table | filter { |row| (($row.package | into string | str downcase | str contains $downcase_prune_term) or ($row.description | into string | str downcase | str contains $downcase_prune_term))} +} -flags: - --help/-h: Display this page +def search-pacstall [input: string] -> table { + if (cmd-exist 'pacstall') { + let pacstall = do { ^pacstall -S $input } | complete + return ($pacstall.stdout | ansi strip | lines | parse "{package} @ {repo}" | reject repo | insert description '' | insert provider 'pacstall') + # if ($result | is-empty) { + # print -n $"\e[A\e[K" + # } + } else { return [] } +} + +def search-flatpak [input: string, desc: bool] -> table { + if (cmd-exist 'flatpak') { + if $desc == true { + let flatpak = (^flatpak search $input --columns=application | lines | wrap 'package' | insert provider 'flatpak' | merge (^flatpak search $input --columns=description | lines | wrap 'description')) + if ($flatpak.package.0 == "No matches found") { return [] } else { return $flatpak } + } else { + let flatpak = (^flatpak search $input --columns=application | lines | wrap 'package' | insert provider 'flatpak' | insert description '') + if ($flatpak.package.0 == "No matches found") { return [] } else { return $flatpak } + } + } else {print 'flatpak not installed'; return [] } +} + +def search-snap [input: string] -> table { + if (cmd-exist 'snap') { + return (^snap search $input | detect columns | get Name | wrap 'package' | insert description '' | insert provider 'snap') + } else { return [] } +} + +#def search-zap [search_term: string] { +# if (cmd-exist 'zap') { +# let all_zap_pkgs = ( http get "https://g.srev.in/get-appimage/index.min.json" | select name summary | rename package description | insert provider zap) +# $all_zap_pkgs | prune-search-table $search_term +# } else { [] } +#} + +#USAGE: adds whitespace to the end of a string $in until it is $length characters long +def add-whitespace-until-string-length [length: int] -> string { + let input: string = $in + let amount = ($length - ($input | str length --grapheme-clusters)) + mut whitespace_string = $input + for _ in 0..<$amount { + $whitespace_string += " " + } + $whitespace_string +} + +#USAGE: restricts the string to a single line when it prints it +def single-line-print [ input: any = ""] { + let pipeline: string = ($in | into string) + let output :string = ((($pipeline + ($input | into string)) | str replace "\n" " »|« ")) + let deansi_output = ($output | ansi strip) + let num_of_ansis: int = ($output | split row "\e" | length) - 1 + let ansi_char_difference: int = ($output | str length --grapheme-clusters) - ($deansi_output | str length --grapheme-clusters) + + mut terminal_width = 100; + if (cmd-exist 'tput') { + $terminal_width = ((tput cols) | into int) + } else if (cmd-exist 'stty') { + $terminal_width = ((stty size| split column " ").column2.0 | into int) + } - --description/-d: By default, $(basename $0) will only display packages - that contain within their name. Use this flag to increase - range and display packages with in their description. + if ($deansi_output | str length ) < ($terminal_width - 2) { + print $output + } else { - -y: Makes functions with confirmation prompts run promptless. + (($output | str substring --grapheme-clusters 0..<(($terminal_width - 2) - 3 + $ansi_char_difference - ($num_of_ansis * 2))) + $"(ansi reset)...") | print + } -input: - Provide a package name or description. - -Example execution: - \$ $(basename $0) install foobar - Found packages matching '${BPurple}foobar${NC}': - - [${BGreen}0${NC}]: pyfoobar (${BGreen}apt${NC}) - [${BGreen}1${NC}]: foobarshell (${BGreen}apt${NC}) - [${BCyan}2${NC}]: foobar (${BCyan}flatpak${NC}) - [${BRed}3${NC}]: foobar-web (${BRed}snap${NC}) - [${BYellow}4${NC}]: foobar-bin (${BYellow}pacstall${NC}) - [${BYellow}5${NC}]: foobar-theme (${BYellow}pacstall${NC}) - - Select which package to install [0-5]: 3 4 5 - Selecting '${BPurple}foobar-web${NC}' from package manager '${BPurple}snap${NC}' - Selecting '${BPurple}foobar-bin${NC}' from package manager '${BPurple}pacstall${NC}' - Selecting '${BPurple}foobar-theme${NC}' from package manager '${BPurple}pacstall${NC}' - Are you sure? (${BGreen}y${NC}/${BRed}N${NC}) - [...] - -${c1} .;:;,. .: -${c1} 'coooooooo:oo.';. -${c1} ,oooooooooooooooo ; -${c1} clllcccllloooooooo;c:'o -${c1}.${c3};${c4}';:::::::::${c1}cclooooooo' -${c3}''',${c4}::::::::::::::${c1}ccclc. -${c3}.'''${c4};::::::::::${c2}l${c4}::::::: -${c3} ''''${c4},:::::::::${c2}kd${c4}. -${c3} .'''''${c4},;::${c2}ck:${c2}oW${c4}; -${c3} ''''''''${c2}kXOM. -${c3} .,,:${c2}dXMK -${c3} ${c2}:k - -$(basename "$0") 0.1.2 -A package manager wrapper for Pacstall, APT, Flatpak and snap -Developed by Elsie19 for -the Rhino Linux distribution." - -function msg() { - local input="$*" - echo -e "$input" +} +def search [input: string, desc: bool = false, extra_prune_terms: table = []] -> table { + translation-dir-path | translate searching.apt | print + # print "Searching apt…" + let apt = (search-apt $input $desc) + print -n $"\e[A\e[K" + # print "Searching Pacstall…" + translation-dir-path | translate searching.pacstall | print + let pacstall = (search-pacstall $input) + print -n $"\e[A\e[K" + # print "Searching flatpak…" + translation-dir-path | translate searching.flatpak | print + let flatpak = (search-flatpak $input $desc) + print -n $"\e[A\e[K" + # print "Searching snap…" + translation-dir-path | translate searching.snap | print + let snap = (search-snap $input) + print -n $"\e[A\e[K" + #print $extra_prune_terms + mut results = ($apt | append $pacstall | append $flatpak | append $snap ) + + #additional search terms management + mut search_term: string = $input + for i in 0..<($extra_prune_terms | length ) { + let prune_term: string = ($extra_prune_terms | select $i).0 + # prune the results based on other search terms + $results = ($results | prune-search-table $prune_term) + # making search terms into one string + $search_term += " " + $search_term += $prune_term + } + + + # print -n $"\e[A\e[K" + if ($results | is-empty) { + # print -e $"No packages found matching '($input)'!" + translation-dir-path | translate none-matching {search: $search_term, color: magenta } | print + exit 1 + } + let results_len = $results | length + + (translation-dir-path | translate found-matching {matches: $results_len, search: $search_term, color: magenta} ) + "\n" | print + # print $"Found packages matching '(ansi purple_bold)($input)(ansi reset)':\n" + + #preparation for descriptions + mut longest_package_name_length = 0 + if $desc { + + #find length of longest package name + for i in 0..<$results_len { + if (($results.package | select $i).0 | str length --grapheme-clusters) > $longest_package_name_length { + $longest_package_name_length = (($results.package | select $i).0 | str length --grapheme-clusters) + } + } + } + mut count = 0 + # Loop over results + for $i in $results { + let style = match $i.provider { + "pacstall" => $"(ansi yellow_bold)", + "apt" => $"(ansi green_bold)", + "flatpak" => $"(ansi cyan_bold)", + "snap" => $"(ansi red_bold)", + + _ => $"(ansi white_bold)" + } + if $desc { + if ($i.description | is-empty) { + single-line-print $"[($style)($count)(ansi reset)]:\t($i.package) \(($style)($i.provider)(ansi reset)\)" + } else { + + single-line-print $"[($style)($count)(ansi reset)]:\t($i.package | add-whitespace-until-string-length ($longest_package_name_length + 1))(ansi white_bold)»|«(ansi reset) ($i.description) \(($style)($i.provider)(ansi reset)\)" + } + } else { + single-line-print $"[($style)($count)(ansi reset)]:\t($i.package) \(($style)($i.provider)(ansi reset)\)" + } + $count += 1 + } + + return $results } -function prompt() { - local input="$1" - local index="$2" - echo -ne "$input [0-$index]: ${BWhite}" +def cleanup [promptless: bool = false] { + if (cmd-exist 'nala') { + ^sudo nala install --fix-broken + if $promptless { + ^sudo nala autoremove -y + } else { + ^sudo nala autoremove + } + } else { + ^sudo apt --fix-broken install + if $promptless { ^sudo apt auto-remove -y } else { ^sudo apt auto-remove } + } + if (cmd-exist 'flatpak') { + ^sudo flatpak repair + if $promptless { ^sudo flatpak uninstall --unused -y } else { ^sudo flatpak uninstall --unused } + } + if (cmd-exist 'snap') { + let snaps = (^snap list --all | detect columns) + for $pkg in $snaps { + if ($pkg.Notes) =~ "disabled" { + ^sudo snap remove $pkg.Name --revision=$pkg.Rev + } + } + } } -function clearscr() { - tput cuu 1 && tput el +def update [promptless: bool = false] { + + let r_u_sure = translation-dir-path| translate ask.upgrade + let sure: string = (input --numchar 1 $"($r_u_sure)") + # let sure = (input $"Are you sure you want to update all packages? \((ansi green_bold)y(ansi reset)/(ansi red_bold)N(ansi reset)\) ") + let no: bool = (($sure != "Y") and ($sure != "y")) + if $no { + exit 1 + } + + if (cmd-exist 'nala') { + if $promptless { + ^sudo nala upgrade --full --no-autoremove -o Acquire::AllowReleaseInfoChange="true" -y + } else { + ^sudo nala upgrade --full --no-autoremove -o Acquire::AllowReleaseInfoChange="true" + } + } else { + ^sudo apt update --allow-releaseinfo-change + if $promptless { ^sudo apt upgrade -y } else { ^sudo apt upgrade } + } + if (cmd-exist 'pacstall') { + ^pacstall -U + if $promptless { ^pacstall -PUp } else { ^pacstall -Up } + } + if (cmd-exist 'flatpak') { + if $promptless { ^sudo flatpak update -y } else { ^sudo flatpak update } + } + if (cmd-exist 'snap') { + ^sudo snap refresh + } + } -function search_pacstall() { - if ! pacstall -S "$*" > /dev/null 2>&1; then - return 1 - else - # remove color codes - local contents=("$(pacstall -S "$*" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '{print $1}')") - fi - echo "${contents[@]}" + + +def user-package-selection [ input: table , purpose: string ] -> table { + mut user_input = "" + print "" + let input_final_index = ($input | length) - 1 + + $user_input = match $purpose { + "install" => (input (translation-dir-path| translate ask.which-install {index: $input_final_index}) | into string), + + "info" => (input (translation-dir-path | translate ask.which-info{ index: $input_final_index }) |into string), + "remove" => (input (translation-dir-path| translate ask.which-remove {index: $input_final_index}) | into string), + _ => [] + } + + #uses regex to filter out non-number inputs, then converts to int + mut user_input_ints = ($user_input | split row ' ' | find --regex "[0-9]+" | find --regex "^[0-9]+" | into int) + + #screens the list for invalid indices + mut drop_list: list = [] + for i in 0..<($user_input_ints | length) { + if ($user_input_ints |select $i).0 > $input_final_index { + $drop_list = ($drop_list | append $i) + } + } + #prunes invalid indices + for i in 0..<($drop_list|length) { + $user_input_ints = ($user_input_ints | drop nth ($drop_list| select $i).0) + } + + #user provided no numbers that were valid + if ($user_input_ints | is-empty) { + let error_msg = translation-dir-path | translate invalid.integers {number: $input_final_index} + error make {msg: $error_msg} + } + $user_input_ints } -function search_apt() { - if [[ -z $DESCRIPTION ]]; then - local contents=("$(apt-cache search --names-only "$*" | awk '{print $1}')") - else - local contents=("$(apt-cache search "$*" | awk '{print $1}')") - fi - if [[ -n $contents ]]; then - echo "${contents[@]}" - else - return 1 - fi + + +def install-or-remove [install: bool = true] { + let input: table = $in + let user_input_ints = user-package-selection $input (if $install {"install"} else { "remove" }) + + $user_input_ints | each { |index| + let pkg = ($input | get $index | get package) + let provider = ($input | get $index | get provider) + + + #print $"Selecting '(ansi purple_bold)($pkg)(ansi reset)' from package manager '(ansi purple_bold)($provider)(ansi reset)'" + + if $install { + translation-dir-path | translate install-select {package: $pkg, manager: $provider, color: "magenta" } | print + } else { + translation-dir-path | translate remove-select {package: $pkg, manager: $provider, color: "magenta" } | print + } + + + let r_u_sure = translation-dir-path| translate ask.sure + let sure = (input --numchar 1 $"($r_u_sure) ") + + let no: bool = (($sure != "Y") and ($sure != "y")) + # let sure = (input $"Are you sure? \((ansi green_bold)y(ansi reset)/(ansi red_bold)N(ansi reset)\) ") + if $no { + translation-dir-path | translate skipping {package: $pkg, manager: $provider, color: "magenta"} | print + } else { + + if $install { + match ($provider) { + "pacstall" => (^pacstall -I $pkg), + "snap" => (^sudo snap install $pkg), + "apt" => (^sudo apt install $pkg -y), + "flatpak" => (^sudo flatpak install $pkg -y), + "zap" => (^sudo zap install $pkg -q) + } + } else { + match ($provider) { + "pacstall" => (^pacstall -R $pkg), + "snap" => (^sudo snap remove $pkg), + "apt" => (^sudo apt remove $pkg -y), + "flatpak" => (^sudo flatpak remove $pkg -y), + "zap" => (^sudo zap remove $pkg -q) + } + } + } + } } -function search_flatpak() { - if [[ -z $DESCRIPTION ]]; then - local contents=("$(LC_ALL=C sudo flatpak search --columns="application" "$*" | grep -i --color=never "$*")") - else - local contents=("$(LC_ALL=C sudo flatpak search --columns="application" "$*")") - fi - if [[ ${contents[*]} == "No matches found" ]]; then - return 1 - else - echo "${contents[@]}" - fi +def sync [ ] { + if (cmd-exist 'nala') { + ^sudo nala update + } else { + ^sudo apt update + } + if (cmd-exist 'flatpak') { + ^flatpak update --appstream + } } -function search_snap() { - if [[ -z $DESCRIPTION ]]; then - local contents=("$(snap find "$*" | awk '{ print $1 }' | tail -n +2 | grep -i --color=never "$*")") - else - local contents=("$(snap find "$*" | awk '{ print $1 }' | tail -n +2)") - fi - if [[ ${contents[*]} == "No matching snaps for"* ]]; then - return 1 - else - echo "${contents[@]}" - fi + + +def info [ ] { + let input: table = $in + let user_input_ints = user-package-selection $input "info" } -case "${1}" in - search) - SEARCH=true - shift - ;; - install) - INSTALL=true - shift - ;; - remove) - REMOVE=true - shift - ;; - cleanup) - CLEANUP=true - shift - if [[ $1 == "-y" ]]; then - PROMPTLESS=true - shift - fi - ;; - update) - UPDATE=true - shift - if [[ $1 == "-y" ]]; then - PROMPTLESS=true - shift - fi - ;; - -h | --help) - echo "$help_flag" - exit 0 - ;; - *) - echo "$help_flag" - exit 1 - ;; -esac -if [[ $1 == "-d" || $1 == "--description" ]]; then - DESCRIPTION=true - shift -fi -if [[ -n $UPDATE ]]; then - if [[ -n $* ]]; then - exit 1 - fi - if [[ -z $PROMPTLESS ]]; then - echo -n $"Are you sure you want to update all packages? (${BGreen}y${NC}/${BRed}N${NC}) " - read -ra read_update - echo -ne "${NC}" - else - read_update=("Y") - fi - case "${read_update[0]}" in - Y* | y*) ;; - *) exit 1 ;; - esac - if command -v nala &> /dev/null; then - if [[ -n $PROMPTLESS ]]; then - sudo nala upgrade -y --full --no-autoremove -o Acquire::AllowReleaseInfoChange="true" - else - sudo nala upgrade --full --no-autoremove -o Acquire::AllowReleaseInfoChange="true" - fi - else - if [[ -n $PROMPTLESS ]]; then - sudo apt update --allow-releaseinfo-change && sudo apt upgrade -y - else - sudo apt update --allow-releaseinfo-change && sudo apt upgrade - fi - fi - if command -v pacstall &> /dev/null; then - if [[ -n $PROMPTLESS ]]; then - pacstall -U - pacstall -PUp - else - pacstall -U - pacstall -Up - fi - fi - if command -v flatpak &> /dev/null; then - if [[ -n $PROMPTLESS ]]; then - sudo flatpak update -y - else - sudo flatpak update - fi - fi - if command -v snap &> /dev/null; then - sudo snap refresh - fi - exit 0 -fi - -if [[ -n $CLEANUP ]]; then - if [[ -n $* ]]; then - exit 1 - fi - if [[ -z $PROMPTLESS ]]; then - echo -n $"Attempting to repair dependencies and remove unused packages. Continue? (${BGreen}y${NC}/${BRed}N${NC}) " - read -ra read_update - echo -ne "${NC}" - else - read_update=("Y") - fi - case "${read_update[0]}" in - Y* | y*) ;; - *) exit 1 ;; - esac - if command -v nala &> /dev/null; then - if [[ -n $PROMPTLESS ]]; then - sudo nala install --fix-broken && sudo nala autoremove -y - else - sudo nala install --fix-broken && sudo nala autoremove - fi - else - if [[ -n $PROMPTLESS ]]; then - sudo apt --fix-broken install && sudo apt auto-remove -y - else - sudo apt --fix-broken install && sudo apt auto-remove - fi - fi - if command -v flatpak &> /dev/null; then - if [[ -n $PROMPTLESS ]]; then - sudo flatpak repair && sudo flatpak uninstall --unused -y - else - sudo flatpak repair && sudo flatpak uninstall --unused - fi - fi - if command -v snap &> /dev/null; then - if [[ -z "$(LANG=C snap list --all | while read snapname ver rev trk pub notes; do if [[ "$notes" == *disabled* ]]; then sudo snap remove "$snapname" --revision="$rev"; fi; done)" ]]; then - echo "Nothing for snap to clean." - fi - fi - exit 0 -fi - -# Lowercase the rest of input -set -- "${*,,}" - -if command -v pacstall &> /dev/null; then - msg $"Searching Pacstall…" - pacstall_search_list=($(search_pacstall $*)) - clearscr -fi -msg $"Searching apt…" -apt_search_list=($(search_apt $*)) -clearscr -if command -v flatpak &> /dev/null; then - msg $"Searching flatpak…" - flatpak_search_list=($(search_flatpak $*)) - clearscr -fi -if command -v snap &> /dev/null; then - msg $"Searching snap…" - snap_search_list=($(search_snap $*)) - clearscr -fi - -if [[ ${#pacstall_search_list} -eq 0 && ${#apt_search_list} -eq 0 && ${#flatpak_search_list} -eq 0 && ${#snap_search_list} -eq 0 ]]; then - msg $"No packages found matching '$*'!" - exit 1 -fi - -msg $"Found packages matching '${BPurple}$*${NC}':" -echo - -count=0 -pkgs=() -pkgrepo=() - -for i in "${flatpak_search_list[@]}"; do - echo -e "[${BCyan}$count${NC}]: $i (${BCyan}flatpak${NC})" - pkgs+=("$i") - pkgrepo+=("flatpak") - ((count++)) -done -for i in "${apt_search_list[@]}"; do - echo -e "[${BGreen}$count${NC}]: $i (${BGreen}apt${NC})" - pkgs+=("$i") - pkgrepo+=("apt") - ((count++)) -done -for i in "${pacstall_search_list[@]}"; do - echo -e "[${BYellow}$count${NC}]: $i (${BYellow}pacstall${NC})" - pkgs+=("$i") - pkgrepo+=("pacstall") - ((count++)) -done -for i in "${snap_search_list[@]}"; do - echo -e "[${BRed}$count${NC}]: $i (${BRed}snap${NC})" - pkgs+=("$i") - pkgrepo+=("snap") - ((count++)) -done - -((count--)) - -if [[ -n $SEARCH ]]; then - exit 0 -fi - -echo - -if [[ -n $INSTALL ]]; then - flatpak_cmd="install" - snap_cmd="install" - apt_cmd="install" - pacstall_cmd="-I" - prompt $"Select which package to install" "$count" -elif [[ -n $REMOVE ]]; then - flatpak_cmd="remove" - snap_cmd="remove" - apt_cmd="remove" - pacstall_cmd="-R" - prompt $"Select which package to remove" "$count" -fi - -read -ra entered_input -echo -ne "${NC}" -if [[ ! ${entered_input[*]} =~ ^(([0-9])\s?)+ ]]; then - msg $"'${entered_input[*]}' is not a valid number" + +def search-cmd-no-args [ ] { + let command: string = $in + let error_msg = translation-dir-path | translate invalid.search-arguments {subcommand: $command} + error make -u {msg: $error_msg} exit 1 -fi - -for i in "${entered_input[@]}"; do - msg $"Selecting '${BPurple}${pkgs[i]}${NC}' from package manager '${BPurple}${pkgrepo[i]}${NC}'" -done - -echo -n $"Are you sure? (${BGreen}y${NC}/${BRed}N${NC}) " -read -r sure -case "${sure}" in - Y* | y*) - true - ;; - *) +} + + + +# USAGE: rpk [function] {flag} +# +# functions: +# install: Install package(s) - Prompts user to respond with +# the number(s) associated with the desired package(s). +# Aliases: nstl, instll, instl, add, i +# +# remove: Uninstall package(s) - Prompts user to respond with +# the number(s) associated with the desired package(s). +# Aliases: rm, rmv, uninstall, r +# +# search: Search for package(s) - Does not have a second prompt. +# Aliases: srch, find, s +# +# update: Updates all packages accessible to the wrapper - does +# not accept , instead use install to update +# individual packages. Has a confirmation prompt. +# Aliases: upgrade, updt, upd, upg, u +# +# cleanup: Attempts to repair broken dependencies and remove any +# unused packages. Does not accept , but has +# a confirmation prompt. +# Aliases: clean, clnp, cln, c +# +# flags: +# --help/-h: Display this page +# +# --multiterm For commands with package search functionality, switches them to accept multiple arguments as additional filtering on a single search +# +# --description/-d: By default, rpk will only display packages +# that contain within their name. Use this flag to increase +# range and display packages with in their description. +# +# -y: Makes functions with confirmation prompts run promptless. +# +# input: +# Provide a package name or description. +# +# Example execution: +# $ rpk install foobar +# Found packages matching: 'foobar': +# +# [0]: pyfoobar (apt) +# [1]: foobarshell (apt) +# [2]: foobar (flatpak) +# [3]: foobar-web (snap) +# [4]: foobar-bin (pacstall) +# [5]: foobar-theme (pacstall) +# +# Select which package to install [0-5]: 3 4 5 +# Selecting 'foobar-web' from package manager 'snap' +# Selecting 'foobar-bin' from package manager 'pacstall' +# Selecting 'foobar-theme' from package manager 'pacstall' +# Are you sure? (y/N) +# [...] +# +# .;:;,. .: +# 'coooooooo:oo.';. +# ,oooooooooooooooo ; +# clllcccllloooooooo;c:'o +# .;';:::::::::cclooooooo' +# ''',::::::::::::::ccclc. +# .''';::::::::::l::::::: +# '''',:::::::::kd. +# .''''',;::ck:oW; +# ''''''''kXOM. +# .,,:dXMK +# :k +# +# rpk 0.1.2 +# A package manager wrapper for Pacstall, APT, Flatpak and snap +# Developed by Elsie19 for +# the Rhino Linux distribution. +def main [ + --description (-d) # Increase range and display packages with in their description + --yes (-y) # Makes functions with confirmation prompts run promptless + --multiterm # Makes functions with search features use multiple terms, filtering by each term + ...rest: string # 'install', 'remove', 'search', 'update', 'cleanup' +] -> int { + if ($rest | is-empty) { + let error_msg = translation-dir-path | translate invalid.no-subcommand + error make -u { msg: $error_msg} exit 1 - ;; -esac - -for i in "${entered_input[@]}"; do - case "${pkgrepo[i]}" in - flatpak) - sudo flatpak "${flatpak_cmd}" "${pkgs[i]}" -y - ret=$? - ;; - apt) - if command -v nala &> /dev/null; then - sudo nala "${apt_cmd}" "${pkgs[i]}" -y - ret=$? - else - sudo apt "${apt_cmd}" "${pkgs[i]}" -y - ret=$? - fi - ;; - pacstall) - pacstall "${pacstall_cmd}" "${pkgs[i]}" - ret=$? - ;; - snap) - sudo snap "${snap_cmd}" "${pkgs[i]}" - ret=$? - ;; - *) - msg $"Invalid repository name!" - exit 1 - ;; - esac -done - -exit "$ret" + } + + # alias catching + mut command = match ($rest.0 | str downcase) { + "install" | "instll" | "instl" | "add" | "nstl" | "i" => "install", + "remove" | "rmv" | "rm" | "uninstall" | "r" => "remove", + "search" | "srch" | "find" | "s" => "search", + "update" | "updt" | "upgrade" | "upd" | "upg" | "u" => "update", + "cleanup" | "clnp" | "cln" | "clean" | "c" => "cleanup", + "sync" | "refresh" | "rfrsh" | "S" => "sync" + _ => "invalid" + + } +# "info" | "information" | "data" | "query" | "qry" | "q" => "info", + if $command == "invalid" { + let error_msg = translation-dir-path | translate invalid.subcommand {subcommand: $rest.0} + error make -u { msg: $error_msg, } + } + + if $command == "install" { + if ($rest | length) < 2 { #install was called without a search term + $command | search-cmd-no-args + } else { + if $multiterm { + (search $rest.1 $description ($rest | skip 2)) | install-or-remove true + } else { + ($rest | skip 1) | each { |searchterm| + (search $searchterm $description) | install-or-remove true + } + } + } + } + if $command == "remove" { + if ($rest | length) < 2 { #remove was called without a search term + $command | search-cmd-no-args + } else { + if $multiterm { + (search $rest.1 $description ($rest | skip 2)) | install-or-remove false + } else { + ($rest | skip 1) | each { |searchterm| + (search $searchterm $description) | install-or-remove false + } + } + } + } + if $command == "search" { + if ($rest | length) < 2 { #search was called without a search term + $command | search-cmd-no-args + } else { + if $multiterm { + let search = (search $rest.1 $description ($rest | skip 2)) + } else { + ($rest | skip 1) | each { |searchterm| + (search $searchterm $description) + } + } + } + } + + #currently removed + if $command == "info" { + if ($rest | length) < 2 { #info was called without a search term + $command | search-cmd-no-args + } else { + (search $rest.1 $description ($rest | skip 2)) | info + } + } + + match $command { + "update" => (update $yes), + "cleanup" => (cleanup $yes) + "sync" => (sync ) + } + +} + diff --git a/translation-tomls/bn.toml b/translation-tomls/bn.toml new file mode 100644 index 0000000..f1b8879 --- /dev/null +++ b/translation-tomls/bn.toml @@ -0,0 +1,64 @@ +#two letters matching the ISO 639-1 code for your language +language = "bn" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translators = "Sourajyoti Basak " + + +[messages] + +# Declares $matches package(s) were found matching $search ($search is $color) +found-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' এর সাথে মিলিত প্যাকেজগুলি পাওয়া গেছে:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "'(ansi color[($color)] bold)($search)' এর সাথে মিলিত কোনো প্যাকেজ পাওয়া যায়নি!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "প্যাকেজ ম্যানেজার (ansi color[($color)] bold)($manager)(ansi reset) থেকে (ansi color[($color)] bold)($package)(ansi reset) নির্বাচন করা হচ্ছে" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "প্যাকেজ ম্যানেজার (ansi color[($color)] bold)($manager)(ansi reset) থেকে (ansi color[($color)] bold)($package)(ansi reset) নির্বাচন করা হচ্ছে" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[magenta] bold)($package)(ansi reset) from (ansi color[magenta bold)($manager)(ansi reset)." + + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) একটি বৈধ সংখ্যা নয়!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "অবৈধ সংগ্রহস্থলের নাম!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = ": ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "[(index)-0] কোন প্যাকেজ ইনস্টল করতে হবে তা নির্বাচন করুন:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = ": ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]" +[messages.searching] +apt = "(ansi color[green] bold)apt(ansi reset)-এ খোঁজ করা হচ্ছে…" +pacstall = "(ansi color[yellow])Pacstall(ansi reset)-এ খোঁজ করা হচ্ছে…" +snap = "(ansi color[red] bold)snap(ansi reset)-এ খোঁজ করা হচ্ছে…" +flatpak = "(ansi color[cyan] bold)flatpak(ansi reset)-এ খোঁজ করা হচ্ছে…" \ No newline at end of file diff --git a/translation-tomls/de.toml b/translation-tomls/de.toml new file mode 100644 index 0000000..4ae4e6a --- /dev/null +++ b/translation-tomls/de.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "de" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Pakete passend zu '(ansi color[($color)] bold)($search)(ansi reset)' gefunden:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Keine passenden Pakete zu '(ansi color[($color)] bold)($search)(ansi reset)' gefunden!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "(ansi color[$color] bold)($package)(ansi reset) von Paketmanager (ansi color[($color)] bold)($manager)(ansi reset) wird gewählt" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "(ansi color[$color] bold)($package)(ansi reset) von Paketmanager (ansi color[($color)] bold)($manager)(ansi reset) wird gewählt" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[magenta] bold)($package)(ansi reset) from (ansi color[magenta bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) ist keine gültige Zahl!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Ungültiger Repository Name!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[(])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Sind Sie sich sicher?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Wählen Sie Pakete aus, welches Installiert werden sollen [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Wählen Sie die Pakete, die Sie löschen möchten [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Sind Sie sicher, dass sie alle Pakete aktualisieren möchten?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]" +[messages.searching] +apt = "Suche in (ansi color[green] bold)APT(ansi reset)…" +pacstall = "Suche in (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Suche in (ansi color[red] bold)Snap(ansi reset)…" +flatpak = "Suche in (ansi color[cyan] bold)Flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/en.toml b/translation-tomls/en.toml new file mode 100644 index 0000000..f320317 --- /dev/null +++ b/translation-tomls/en.toml @@ -0,0 +1,35 @@ +language = "en" +territory = "xx" +modifier = "blank" +fallback = "none" +[messages] + + +found-matching = "Found ($matches) package(s) matching '(ansi color[($color)] bold)($search)(ansi reset)':" +none-matching = "No packages found matching '(ansi color[($color)] bold)($search)(ansi reset)'!" +install-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset) for installation." +remove-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset) for removal." +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +[messages.invalid] +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +number = "($number) is not a valid number!" +repository = "($repo) is not a valid repository!" +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." +package-number = "($number) is not a valid package number!" + + +[messages.ask] +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +which-install = "Select which package(s) to install [0-($index)]:" +which-remove = "Select which package(s) to remove [0-($index)]:" +which-info = "Select which package(s) to recieve info about [0-($index)]:" +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +[messages.searching] +apt = "Searching (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Searching (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Searching (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Searching (ansi color[cyan] bold)flatpak(ansi reset)…" + diff --git a/translation-tomls/es.toml b/translation-tomls/es.toml new file mode 100644 index 0000000..64b3231 --- /dev/null +++ b/translation-tomls/es.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "es" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Paquetes encontrados que coinciden con '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "¡Fueron encontrados paquetes que coinciden con '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Seleccionando (ansi color[magenta] bold)($package)(ansi reset) del gestor de paquetes (ansi color[($color)] bold)($manager)(ansi reset)." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Seleccionando (ansi color[magenta] bold)($package)(ansi reset) del gestor de paquetes (ansi color[($color)] bold)($manager)(ansi reset)." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[magenta] bold)($package)(ansi reset) from (ansi color[magenta] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "¡($number) no es un número válido!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "¡Nombre de repositorio inválido!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[(])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "¿Estás seguro?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Seleccione el paquete que desea instalar [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]" +[messages.searching] +apt = "Buscando (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Buscando (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Buscando (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Buscando (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/fr.toml b/translation-tomls/fr.toml new file mode 100644 index 0000000..b26ce0d --- /dev/null +++ b/translation-tomls/fr.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Paquets trouvés correspondant à '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Aucun paquet trouvé correspondant à '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Sélection de (ansi color[($color)] bold)($package)(ansi reset) dans le gestionnaire de paquets (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Sélection de (ansi color[($color)] bold)($package)(ansi reset) dans le gestionnaire de paquets (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) n'est pas un nombre valide!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Nom de dépôt non valide!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[(])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Sélectionnez le paquet à installer [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Recherche de l'(ansi color[green] bold)apt(ansi reset)…" +pacstall = "Recherche de (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Recherche de (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Recherche de (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/hi.toml b/translation-tomls/hi.toml new file mode 100644 index 0000000..eac1476 --- /dev/null +++ b/translation-tomls/hi.toml @@ -0,0 +1,61 @@ +#two letters matching the ISO 639-1 code for your language +language = "" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "Sourajyoti Basak " +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' से मेल खाने वाले पैकेज मिले:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' से मेल खाता कोई पैकेज नहीं मिला!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "पैकेज मैनेजर (ansi color[($color)] bold)($manager)(ansi reset) से\n(ansi color[($color))] bold)($package)(ansi reset) चुने गए हैं" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "पैकेज मैनेजर (ansi color[($color)] bold)($manager)(ansi reset) से\n(ansi color[($color))] bold)($package)(ansi reset) चुने गए हैं" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) वैध संख्या नहीं है!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "अवैध भंडार का नाम!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[(])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "[($index)-0] इनस्टॉल करने के लिए एक पैकेज चुनें:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "(ansi color[green] bold)APT(ansi reset) में खोजा जा रहा है…" +pacstall = "(ansi color[yellow] bold)Pacstall(ansi reset) में खोजा जा रहा है…" +snap = "(ansi color[red] bold)स्नैप(ansi reset) में खोजा जा रहा है…" +flatpak = "(ansi color[cyan] bold)फ्लैटपैक(ansi reset) में खोजा जा रहा है…" \ No newline at end of file diff --git a/translation-tomls/id.toml b/translation-tomls/id.toml new file mode 100644 index 0000000..6cd4e19 --- /dev/null +++ b/translation-tomls/id.toml @@ -0,0 +1,62 @@ +#two letters matching the ISO 639-1 code for your language +language = "id" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "yukidream " + +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Menemukan paket yang sesuai '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Tidak menemukan paket yang cocok '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Memilih (ansi color[($color)] bold)($package)(ansi reset) dari manajemen paket (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Memilih (ansi color[($color)] bold)($package)(ansi reset) dari manajemen paket (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) bukan angka yang sah!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Nama repositori yang tidak sah!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Memilih paket yang akan dipasang [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Mencari (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Mencari (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Mencari (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Mencari (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/ie.toml b/translation-tomls/ie.toml new file mode 100644 index 0000000..94ff047 --- /dev/null +++ b/translation-tomls/ie.toml @@ -0,0 +1,62 @@ +#two letters matching the ISO 639-1 code for your language +language = "ie" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "OIS " + +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Trovat paccages correspondente a '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Null paccages trovat quel corresponde a '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Selecte (ansi color[($color)] bold)($package)(ansi reset) del gerente de paccages (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Selecte (ansi color[($color)] bold)($package)(ansi reset) del gerente de paccages (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) ne es un valid númere!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Ínvalid nómine de un repositoria!!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Esque vu es cert?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Selecter un paccage a installar [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Selecter un paccage a remover [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Esque vu vole actualisar omni paccages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Serchante (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Serchante (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Serchante (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Serchante (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/it.toml b/translation-tomls/it.toml new file mode 100644 index 0000000..c792488 --- /dev/null +++ b/translation-tomls/it.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Sono stati trovati pacchetti corrispondenti a '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Nessun pacchetto corrispondente a '(ansi color[($color)] bold)($search)(ansi reset)' trovato!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Selezionando (ansi color[($color)] bold)($package)(ansi reset) dal gestore di pacchetti (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Selezionando (ansi color[($color)] bold)($package)(ansi reset) dal gestore di pacchetti (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) non è un numero valido!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Nome del repository non valido!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Seleziona il pacchetto da installare [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Cercando su (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Cercando su (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Cercando su (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Cercando su (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/ko.toml b/translation-tomls/ko.toml new file mode 100644 index 0000000..af0f4f9 --- /dev/null +++ b/translation-tomls/ko.toml @@ -0,0 +1,61 @@ +#two letters matching the ISO 639-1 code for your language +language = "ko" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "DtotheFuture " +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' 와 일치하는 패키지를 찾았습니다:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' 와 일치하는 패키지를 찾을 수 없습니다!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "패키지 관리자 (ansi color[($color)] bold)($manager)(ansi reset) 에서 (ansi color[($color))] bold)($package)(ansi reset) 를 선택했습니다" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "패키지 관리자 (ansi color[($color)] bold)($manager)(ansi reset) 에서 (ansi color[($color))] bold)($package)(ansi reset) 를 선택했습니다" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) 은 유효한 번호가 아닙니다!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "저장소 이름이 잘못되었습니다!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "설치할 패키지를 선택해주세요 [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "(ansi color[green] bold)APT(ansi reset) 검색 중…" +pacstall = "(ansi color[yellow] bold)Pacstall(ansi reset) 검색 중…" +snap = "(ansi color[red] bold)Snap(ansi reset) 검색 중…" +flatpak = "(ansi color[cyan] bold)Flatpak(ansi reset) 검색 중…" \ No newline at end of file diff --git a/translation-tomls/lang-template.toml b/translation-tomls/lang-template.toml new file mode 100644 index 0000000..505ad83 --- /dev/null +++ b/translation-tomls/lang-template.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Found ($matches) package(s) matching '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "No packages found matching '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color))] bold)($manager)(ansi reset) for installation." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset) for removal." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) is not a valid number!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "($repo) is not a valid repository!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Select which package(s) to install [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Searching (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Searching (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Searching (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Searching (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/nl.toml b/translation-tomls/nl.toml new file mode 100644 index 0000000..4fd03c0 --- /dev/null +++ b/translation-tomls/nl.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "nl" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Pakketten die overeenkomen met '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Er zijn geen pakketten gevonden die overeenkomen met '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Keuzes: (ansi color[($color)] bold)($package)(ansi reset) met behulp van pakketbeheerder (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Keuzes: (ansi color[($color)] bold)($package)(ansi reset) met behulp van pakketbeheerder (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) is geen geldig getal!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "De pakketbronnaam is ongeldig!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Weet u het zeker?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Kies de te installeren pakketten [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Kies de te verwijderen pakketten [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Weet u zeker dat u alle pakketten wilt bijwerken?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Bezig met doorzoeken van (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Bezig met doorzoeken van(ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Bezig met doorzoeken van (ansi color[red] bold)Snap(ansi reset)…" +flatpak = "Bezig met doorzoeken van (ansi color[cyan] bold)Flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/pt_br.toml b/translation-tomls/pt_br.toml new file mode 100644 index 0000000..fe82969 --- /dev/null +++ b/translation-tomls/pt_br.toml @@ -0,0 +1,61 @@ +#two letters matching the ISO 639-1 code for your language +language = "pr" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "br" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translater = "Raul Dipeas " +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Pacotes encontrados correspondentes a '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Nenhum pacote encontrado correspondente a '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Selecionando (ansi color[($color)] bold)($package)(ansi reset) do gerenciador de pacotes (ansi color[($color))] bold)($manager)(ansi reset) for installation." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset) for removal." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) não é um número válido!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Nome de repositório inválido!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Tem certeza?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Selecione qual pacote instalar [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Selecione qual pacote remover [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Tem certeza de que deseja atualizar todos os pacotes?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Procurando (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Procurando(ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Procurando (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Procurando (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/ro.toml b/translation-tomls/ro.toml new file mode 100644 index 0000000..1f57d5c --- /dev/null +++ b/translation-tomls/ro.toml @@ -0,0 +1,61 @@ +#two letters matching the ISO 639-1 code for your language +language = "ro" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "Elsie " +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Următoarele aplicații care se potrivesc cu '(ansi color[($color)] bold)($search)(ansi reset)' au fost găsite:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Nu au fost găsite aplicații care să se potrivească cu '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Ai selectat (ansi color[($color)] bold)($package)(ansi reset) din registrul de aplicații (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Ai selectat (ansi color[($color)] bold)($package)(ansi reset) din registrul de aplicații (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) nu este un număr valid!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Acest registru de aplicații nu există!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Selectează care aplicație să fie instalată [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Căutare în (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Căutare în (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Căutare în (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Căutare în (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/ru.toml b/translation-tomls/ru.toml new file mode 100644 index 0000000..23abfdb --- /dev/null +++ b/translation-tomls/ru.toml @@ -0,0 +1,62 @@ +#two letters matching the ISO 639-1 code for your language +language = "ru" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translater = "OIS " + +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Пакеты по шаблону '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Не найдены пакеты по шаблону '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Выбран (ansi color[($color)] bold)($package)(ansi reset) из менеджера пакетов (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Выбран (ansi color[($color)] bold)($package)(ansi reset) из менеджера пакетов (ansi color[($color))] bold)($manager)(ansi reset)." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) не является числом!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Неверное имя репозитория!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Вы уверены?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Выберите устанавливаемый пакет [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Выберите удаляемый пакет [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Обновить все пакеты?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Поиск в (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Поиск в (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Поиск в (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Поиск в (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/sv.toml b/translation-tomls/sv.toml new file mode 100644 index 0000000..4194897 --- /dev/null +++ b/translation-tomls/sv.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "sv" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Hittade paket som liknar '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Inga paket hittas som liknar '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Väljer (ansi color[($color)] bold)($package)(ansi reset) från pakethanterare (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Väljer (ansi color[($color)] bold)($package)(ansi reset) från pakethanterare (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) är inte ett giltigt nummer!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Ojiltigt arkivnamn!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Välj vilket paket att installera [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Söker i (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Söker i (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Söker i (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Söker i (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/uk.toml b/translation-tomls/uk.toml new file mode 100644 index 0000000..556755d --- /dev/null +++ b/translation-tomls/uk.toml @@ -0,0 +1,63 @@ +#two letters matching the ISO 639-1 code for your language +language = "uk" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "Dan " + + +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "Знайдено пакунки, які відповідають '(ansi color[($color)] bold)($search)(ansi reset)':" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "Не знайдено пакунків, що відповідають '(ansi color[($color)] bold)($search)(ansi reset)'!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "Вибір (ansi color[($color)] bold)($package)(ansi reset) з менеджера пакунків (ansi color[($color))] bold)($manager)(ansi reset) for installation." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset) for removal." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) неприпустиме число!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "Неправильна назва сховища!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Ви впевнені?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "Виберіть, який пакунок встановити [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Виберіть, який пакунок видалити [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Ви впевнені, що хочете оновити всі пакунки?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "Пошук (ansi color[green] bold)apt(ansi reset)…" +pacstall = "Пошук (ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "Пошук (ansi color[red] bold)snap(ansi reset)…" +flatpak = "Пошук (ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file diff --git a/translation-tomls/ur.toml b/translation-tomls/ur.toml new file mode 100644 index 0000000..fe873f9 --- /dev/null +++ b/translation-tomls/ur.toml @@ -0,0 +1,61 @@ +#two letters matching the ISO 639-1 code for your language +language = "ur" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "xx" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" + +translator = "Sourajyoti Basak " +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' سے مماثل پیکیجز ملے:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "'(ansi color[($color)] bold)($search)(ansi reset)' سے مماثل کوئی پیکیج نہیں ملا!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "پیکیج مینیجر سے (ansi color[($color)] bold)($package)(ansi reset) کو منتخب کیا گیا (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "پیکیج مینیجر سے (ansi color[($color)] bold)($package)(ansi reset) کو منتخب کیا گیا (ansi color[($color))] bold)($manager)(ansi reset)" +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) درست تعداد نہیں ہے!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "($repo) is not a valid repository!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "Are you sure?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "[($index)-0] منتخب کریں کہ کون سا پیکیج انسٹال کرنا ہے:" +# Asks user to select package(s) 0- $index to remove +which-remove = "Select which package(s) to remove [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "Are you sure you want to upgrade all packages?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "(ansi color[green] bold)apt(ansi reset) میں تلاش کر رہا ہے…" +pacstall = "(ansi color[yellow] bold)Pacstall(ansi reset) میں تلاش کر رہا ہے…" +snap = "(ansi color[red] bold)snap(ansi reset) میں تلاش کر رہا ہے…" +flatpak = "(ansi color[cyan] bold)flatpak(ansi reset) میں تلاش کر رہا ہے…" \ No newline at end of file diff --git a/translation-tomls/zh_cn.toml b/translation-tomls/zh_cn.toml new file mode 100644 index 0000000..394ea0c --- /dev/null +++ b/translation-tomls/zh_cn.toml @@ -0,0 +1,59 @@ +#two letters matching the ISO 639-1 code for your language +language = "zh" +#if you are doing a general translation, leave this xx, otherwise, match this to the 2 letter ISO 3166-1 code for the territory you are coding for +territory = "cn" +#this will almost alway be left as "blank". If you are making a specific translation for a POSIX locale code, this is what follows the @ symbol +modifier = "blank" +#name of language toml (without the extension) to fall back to in case of incomplete translation +fallback = "en" +[messages] + +# Declares $matches package(s) were found matching $search +found-matching = "找到匹配 '(ansi color[($color)] bold)($search)(ansi reset)' 的软件包:" + +# Declares no packages were found matching $search ($search is $color) +none-matching = "未找到匹配 '(ansi color[($color)] bold)($search)(ansi reset)' 的软件包!" +# Declares $package from $manager is being selected for installation ($package & $manager are $color) +install-select = "从软件包管理器 (ansi color[($color)] bold)($manager)(ansi reset) 中选择 (ansi color[($color))] bold)($package)(ansi reset) for installation." +# Declares $package from $manager is being selected for removal ($package & $manager are $color) +remove-select = "Selecting (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset) for removal." +# Declares the $package from $manager is being skipped (in the process of installation/removal) ($package & $manager are $color) +skipping = "Skipping (ansi color[($color)] bold)($package)(ansi reset) from (ansi color[($color)] bold)($manager)(ansi reset)." + +# Various error conditions, when user enters wrong data +[messages.invalid] +# Declares that the user entered no integers <= $number +integers = "None of the inputs you provided were integers less than or equal to ($number)!" +# Currently out of use +# Declares $number is not a valid number +number = "($number) 不是一个有效数字!" +#Currently out of use +# Declares $repo to not be a valid repository +repo = "无效仓库名称!" +# Informs the user that they entered the command "rhino-pkg $subcommand" without a search term, which it requires +search-arguments = "(ansi color[magenta])rhino-pkg ($subcommand)(ansi reset) requires at least one search term argument." +# Declares $subcommand is not a valid rhino-pkg command. Instructs user to help page +subcommand = "'(ansi color[red])($subcommand)(ansi reset)' is not a valid sub-command! To see a list of valid sub-commands run '(ansi color[magenta])rhino-pkg -h(ansi reset)'" +# Declares that the user entered no sub-command, which rhino-pkg needs. Instructs user to help page +no-subcommand = "(ansi color[magenta] bold)rhino-pkg(ansi reset) needs a sub-command in order to run. To see these run '(ansi color[magenta])rhino-pkg -h(ansi reset)'." + + +#Questions to ask the user +[messages.ask] +# Asks a generic "Are you sure", **make sure the y and N in the prompt are not changed, y and N are not to be translated** +sure = "是否确定?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" +# Asks user to select package(s) 0- $index to install +which-install = "选择要安装的软件包 [0-($index)]:" +# Asks user to select package(s) 0- $index to remove +which-remove = "选择要移除的软件包 [0-($index)]:" +# Asks user to select packages(s) 0- $index to recieve information about +which-info = "Select which package(s) to recieve info about [0-($index)]:" +# Asks user if they are sure to upgrade all packages **make sure y and N in the prompt are not changed, y and N are not to be translated** +upgrade = "确定更新全部软件包?: ((ansi color[green] bold)y(ansi reset)/(ansi color[red] bold)N(ansi reset))" + +# Declare "Searching [package manager]…" +[messages.searching] +apt = "正在检索(ansi color[green] bold)apt(ansi reset)…" +pacstall = "正在检索(ansi color[yellow] bold)Pacstall(ansi reset)…" +snap = "正在检索(ansi color[red] bold)snap(ansi reset)…" +flatpak = "正在检索(ansi color[cyan] bold)flatpak(ansi reset)…" \ No newline at end of file