From ecb2a2ff695ccd4c722b5aa93a777520dd6d45e4 Mon Sep 17 00:00:00 2001 From: Eduard Bloch Date: Thu, 3 Oct 2024 00:46:04 +0200 Subject: [PATCH] Overhaul content processing No dummy main categories, resolve incomplete references. Following the spec more closely, identifying apppriate categories. Don't consider application base library type as category. --- contrib/conv_cat.py | 97 ++++++++++------------ src/fdomenu.cc | 96 +++++++++++++++++----- src/fdospecgen.h | 190 +++++++++++++------------------------------- 3 files changed, 173 insertions(+), 210 deletions(-) diff --git a/contrib/conv_cat.py b/contrib/conv_cat.py index 732619393..5428ac305 100644 --- a/contrib/conv_cat.py +++ b/contrib/conv_cat.py @@ -8,12 +8,11 @@ debug = True -edges = collections.defaultdict(lambda: set()) paths = collections.defaultdict(lambda: list()) hints = dict() # a few special ones, those from the spec are added from table input -main_cats = {"Accessibility", "Screensavers", "WINE", "Other"} +main_cats = set() # "Accessibility", "Screensavers", "WINE"} def add_edges(key :str, multicand :list): @@ -32,6 +31,8 @@ def add_edges(key :str, multicand :list): main_cats.add(row[0].strip()) hints[row[0]] = row[1] +if debug: + print(f"main cats: {main_cats}", file=sys.stderr) with open('Additional_Categories.csv', newline='') as csvfile: rdr = csv.reader(csvfile, dialect='unix') @@ -40,55 +41,42 @@ def add_edges(key :str, multicand :list): assert(len(row) == 3) if " " in row[0]: # the header continue - multicand = list(map(lambda s: s.strip(), re.split(r'\sor\s', row[2]))) - add_edges(row[0], multicand) + # we don't care about "based on foo library", that is not a real section + if "Application based on" in row[1]: + continue hints[row[0]] = row[1] + for m in re.split(r'\s+or\s+', row[2]): + m = m.strip() + paths[row[0]].append(list(m.split(';'))) + +# let's fixup references which are not leading to some main category directly +resolved = False +while not resolved: + resolved = True + for k, v in paths.items(): + for w in v: + cat = w[0] + if not cat or cat in main_cats: + continue + if cat not in paths: + print(f"Warning, cannot resolve {cat}", file=sys.stderr) + continue + for more in paths[cat]: + w[:0] = more + resolved = False +print(f"{paths}", file=sys.stderr) -#print(edges, file=sys.stderr) +groupedByLength = collections.defaultdict(lambda: list()) +for k, v in paths.items(): + for l in v: + groupedByLength[1+len(l)].append(l + [k]) +groupedByLength[1] = list(map(lambda x: [x], main_cats)) -def xxx(): - """ - Probably BS, trying to expand the graph, but fails on equally named nodes. - :return: - """ - global edges - keyz = list(edges.keys()) - for k in keyz: - temp = list(edges[k]) - newset = set() - for vv in temp: - xp = vv.split(';') - if len(xp) == 1: - continue - #print(f"multi cand? {k} <-> {vv}") - newset.add(xp[-1]) - chain = list(xp) - chain.append(k) - print(f"chain? {chain}", file=sys.stderr) - while len(chain) > 1: - add_edges(chain[-1], [chain[-2]]) - chain.pop(-1) - edges[k] = newset - - -for k, v in edges.items(): - for vv in v: - #print(f"XX: {vv}") - xp = [k] + list(reversed(vv.strip().split(';'))) - if not xp[-1]: - xp[-1] = "Other" - if xp[-1] not in main_cats: - xp = xp + ["Other"] - if debug: print(f"{len(xp)} -> {xp}", file=sys.stderr) - paths[len(xp)].append(xp) - -paths[1] = list(map(lambda x: [x], main_cats)) - -if debug: print(paths, file=sys.stderr) - -keysByLen = list(reversed(sorted(paths.keys()))) +print(f"{groupedByLength}", file=sys.stderr) + +#keysByLen = list(reversed(sorted(paths.keys()))) print(f"""/** * WARNING: this file is autogenerated! Any change might be overwritten! @@ -107,23 +95,22 @@ def xxx(): using t_menu_path_table = std::initializer_list; using t_menu_path_table_list = std::initializer_list; -#define MENU_DEPTH_MAX {keysByLen[0]} - constexpr t_menu_path_table_list valid_paths = {{""") -for k in keysByLen: +for k in reversed(sorted(groupedByLength.keys())): print(f"\n\t// menu locations of depth {k}\n\t{{") - byFirst = sorted(paths[k], key=lambda l: l[0]) - for v in byFirst: + ways = groupedByLength[k] + for v in sorted(ways, key=lambda x: x[-1]): print("\t\t{") - for t in v: + for t in reversed(v): print("// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: " + hints.get(t, t)) - print("\t\t\tN_(\"" + t + "\"),") + if t: + print("\t\t\tN_(\"" + t + "\"),") + else: + print("\t\t\t\"" + t + "\",") print("\t\t},") print("\t},") print(f"""}}; -#define SIZE_OF_MENU_TABLE {len(keysByLen)} - #endif // FDO_GEN_MENU_STRUCTURE_H""") diff --git a/src/fdomenu.cc b/src/fdomenu.cc index a2c640794..b24ae250b 100644 --- a/src/fdomenu.cc +++ b/src/fdomenu.cc @@ -37,6 +37,7 @@ #include #include #include // For std::move +#include #include #include @@ -89,10 +90,11 @@ char *terminal_command; char *terminal_option; // global defaults and helpers -static string ICON_FOLDER("folder"); +static const string ICON_FOLDER("folder"), OTH("Other"); string indent_hint(""); // use this to dump optional comment data, deque is pointer-stable deque comment_pool; +set valid_main_cats; /* * Certain parts borrowed from apt-cacher-ng by its autor, either from older @@ -143,6 +145,10 @@ template struct lessByDerefAdaptor { bool operator()(const T *a, const T *b) { return *a < *b; } }; +template const T &iback(const initializer_list &q) { + return *(q.end() - 1); +} + /** * Basic base implementation of a reference-counted class */ @@ -720,34 +726,83 @@ struct MenuNode { } }; +const auto lessFirstStr = [](const t_menu_path &a, const t_menu_path &b) { + return strcmp(*a.begin(), *b.begin()) < 0; +}; + void MenuNode::sink_in(DesktopFilePtr pDf) { - static const auto lessFirstStr = [](const t_menu_path &a, - const t_menu_path &b) { - return strcmp(*a.begin(), *b.begin()) < 0; + // XXX: use plain pointers, with length, or string_view? Probably alost + // worthless because SSO applies in the vast majority of cases + static vector main_cats, sub_cats; + main_cats.clear(); + sub_cats.clear(); + + for (tSplitWalk split(pDf->Categories, ";"); split.Next();) { + string k(split); + auto hit = valid_main_cats.find(k); + if (hit != valid_main_cats.end()) { + DBGMSG("mcat: " << k); + main_cats.push_back(std::move(k)); + } else { + DBGMSG("scat: " << k); + sub_cats.push_back(std::move(k)); + } + } + bool added_somewhere = false; + auto install = [&pDf, &added_somewhere](MenuNode *cur) { + if (!cur) + return; + added_somewhere = true; + cur->apps.emplace(pDf->GetNamePtr(), AppEntry(pDf)); }; - auto add_sub_menues = [&](const t_menu_path &mp) { - MenuNode *cur = this; - for (auto it = mp.end() - 1; it >= mp.begin(); --it) - cur = &cur->submenus[(*it && **it) ? *it : "Other"]; + auto add_sub_menues = [&](const t_menu_path &mp, MenuNode *cur, + int roffset = -1) { + auto itLast = mp.end() + roffset; + for (auto it = itLast; it >= mp.begin(); --it) + cur = &cur->submenus[*it]; return cur; }; - for (tSplitWalk split(pDf->Categories, ";"); split.Next();) { - auto cat = split.str(); - t_menu_path refval = {cat.c_str()}; - - // maybe start main cats only - for (auto w = no_sub_cats ? (valid_paths.end() - 1) - : valid_paths.begin(); - w != valid_paths.end(); ++w) { + for (const auto &sk : sub_cats) { + t_menu_path refval = {sk.c_str()}; + for (auto w = valid_paths.begin(); w != valid_paths.end(); ++w) { auto rng = std::equal_range(w->begin(), w->end(), refval, lessFirstStr); - for (auto it = rng.first; it != rng.second; ++it) - (*add_sub_menues(*it)) - .apps.emplace(pDf->GetNamePtr(), AppEntry(pDf)); + for (auto iPath = rng.first; iPath != rng.second; ++iPath) { + string mk = iback(*iPath); + if (no_sub_cats) { + if (!mk.empty()) + install(&submenus[mk]); + } else if (!mk.empty()) { + // easy case, path to the exact main category is known + install(add_sub_menues(*iPath, this, -1)); + } else { + // apply to all cats as per spec + if (main_cats.empty()) + install(add_sub_menues(*iPath, &submenus[OTH], -2)); + else { + + for (const auto &any_mk : main_cats) { + install( + add_sub_menues(*iPath, &submenus[any_mk], -2)); + } + } + } + } + } + } + + // catch-all + if (!added_somewhere) { + + if (main_cats.empty()) + install(&submenus[OTH]); + else { + for (const auto &mk : main_cats) + install(&submenus[mk]); } } } @@ -1129,6 +1184,9 @@ int main(int argc, char **argv) { deadline_all = now + std::chrono::milliseconds(b); } + for (const auto &p : *(valid_paths.end() - 1)) + valid_main_cats.insert(*p.begin()); + auto justLang = string(msglang ? msglang : ""); justLang = justLang.substr(0, justLang.find('.')); diff --git a/src/fdospecgen.h b/src/fdospecgen.h index 9f8df034a..9a4315dcb 100644 --- a/src/fdospecgen.h +++ b/src/fdospecgen.h @@ -15,8 +15,6 @@ using t_menu_path = std::initializer_list; using t_menu_path_table = std::initializer_list; using t_menu_path_table_list = std::initializer_list; -#define MENU_DEPTH_MAX 4 - constexpr t_menu_path_table_list valid_paths = { // menu locations of depth 4 @@ -28,8 +26,8 @@ constexpr t_menu_path_table_list valid_paths = { N_("Settings"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A tool to manage hardware components, like sound cards, video cards or printers N_("HardwareSettings"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Settings applications + N_("Settings"), }, }, @@ -44,20 +42,12 @@ constexpr t_menu_path_table_list valid_paths = { N_("Utility"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on DDE libraries - N_("DDE"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on Qt libraries - N_("Qt"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A dictionary N_("Dictionary"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A text tool utility N_("TextTools"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Small utility application, "Accessories" + N_("Utility"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A file manager @@ -68,22 +58,6 @@ constexpr t_menu_path_table_list valid_paths = { N_("System"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on GNOME libraries - N_("GNOME"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on GTK+ libraries - N_("GTK"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on KDE libraries - N_("KDE"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: QT - N_("QT"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An app related to MIDI N_("Midi"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application @@ -179,14 +153,6 @@ constexpr t_menu_path_table_list valid_paths = { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application for viewing, creating, or processing graphics N_("Graphics"), }, - { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on XFCE libraries - N_("XFCE"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on GTK+ libraries - N_("GTK"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, }, // menu locations of depth 2 @@ -224,8 +190,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application handles adult or explicit material N_("Adult"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Adventure style game @@ -236,8 +202,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A simple amusement N_("Amusement"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Arcade style game @@ -290,14 +256,14 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to edit audio/video files N_("AudioVideoEditing"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application - N_("Video"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application + N_("Audio"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to edit audio/video files N_("AudioVideoEditing"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application - N_("Audio"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application + N_("Video"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to edit audio/video files @@ -336,12 +302,6 @@ constexpr t_menu_path_table_list valid_paths = { N_("Development"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on COSMIC libraries - N_("COSMIC"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A calculator N_("Calculator"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Small utility application, "Accessories" @@ -404,8 +364,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application that only works inside a terminal (text-based or command line application) N_("ConsoleOnly"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside:   @@ -428,8 +388,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Important application, core to the desktop such as a file manager or a help browser N_("Core"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Data visualization software @@ -446,8 +406,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to manage a database N_("Database"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application for presenting, creating, or processing multimedia (audio/video) - N_("AudioVideo"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An office type application + N_("Office"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to manage a database @@ -458,8 +418,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to manage a database N_("Database"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An office type application - N_("Office"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application for presenting, creating, or processing multimedia (audio/video) + N_("AudioVideo"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A tool to debug applications @@ -494,8 +454,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Help or documentation N_("Documentation"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Economy software @@ -524,20 +484,20 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Electronics software, e.g. a circuit designer N_("Electronics"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Email application N_("Email"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Network application such as a web browser - N_("Network"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An office type application + N_("Office"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Email application N_("Email"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An office type application - N_("Office"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Network application such as a web browser + N_("Network"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Emulator of another platform, such as a DOS emulator @@ -554,8 +514,8 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Engineering software, e.g. CAD programs N_("Engineering"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: + "", }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: RSS, podcast and other subscription based contents @@ -566,14 +526,14 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A file tool utility N_("FileTools"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: System application, "System Tools" such as say a log viewer or network monitor - N_("System"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Small utility application, "Accessories" + N_("Utility"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A file tool utility N_("FileTools"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Small utility application, "Accessories" - N_("Utility"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: System application, "System Tools" such as say a log viewer or network monitor + N_("System"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Tools like FTP or P2P programs @@ -600,12 +560,6 @@ constexpr t_menu_path_table_list valid_paths = { N_("Office"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on GTK+ libraries - N_("GTK"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A GUI designer application N_("GUIDesigner"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An application for development @@ -650,14 +604,14 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: HAM radio software N_("HamRadio"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application - N_("Audio"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Network application such as a web browser + N_("Network"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: HAM radio software N_("HamRadio"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Network application such as a web browser - N_("Network"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application + N_("Audio"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A tool to manage hardware components, like sound cards, video cards or printers @@ -720,12 +674,6 @@ constexpr t_menu_path_table_list valid_paths = { N_("Network"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on Java GUI libraries, such as AWT or Swing - N_("Java"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A game for kids N_("KidsGame"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A game @@ -816,12 +764,6 @@ constexpr t_menu_path_table_list valid_paths = { N_("Network"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on Motif libraries - N_("Motif"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Musical software N_("Music"), // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application for presenting, creating, or processing multimedia (audio/video) @@ -884,14 +826,14 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to play audio/video files N_("Player"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application - N_("Video"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application + N_("Audio"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to play audio/video files N_("Player"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application - N_("Audio"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application + N_("Video"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to play audio/video files @@ -914,14 +856,14 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Project management application N_("ProjectManagement"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An application for development - N_("Development"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An office type application + N_("Office"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Project management application N_("ProjectManagement"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An office type application - N_("Office"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An application for development + N_("Development"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Desktop Publishing applications and Color Management tools @@ -936,22 +878,16 @@ constexpr t_menu_path_table_list valid_paths = { N_("Office"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application based on Qt libraries - N_("Qt"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to record audio/video files N_("Recorder"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application - N_("Video"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application + N_("Audio"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to record audio/video files N_("Recorder"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application - N_("Audio"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application + N_("Video"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Application to record audio/video files @@ -1130,14 +1066,14 @@ constexpr t_menu_path_table_list valid_paths = { { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A tool for web developers N_("WebDevelopment"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An application for development - N_("Development"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Network application such as a web browser + N_("Network"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A tool for web developers N_("WebDevelopment"), -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Network application such as a web browser - N_("Network"), +// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An application for development + N_("Development"), }, { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A word processor @@ -1150,10 +1086,6 @@ constexpr t_menu_path_table_list valid_paths = { // menu locations of depth 1 { { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Accessibility - N_("Accessibility"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: An audio application N_("Audio"), }, @@ -1186,18 +1118,10 @@ constexpr t_menu_path_table_list valid_paths = { N_("Office"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Other - N_("Other"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Scientific software N_("Science"), }, { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Screensavers - N_("Screensavers"), - }, - { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: Settings applications N_("Settings"), }, @@ -1213,13 +1137,7 @@ constexpr t_menu_path_table_list valid_paths = { // TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: A video application N_("Video"), }, - { -// TRANSLATORS: This is a SHORT category menu name from freedesktop.org. Please add compact punctuation if needed but no double-quotes! Hint for the content inside: WINE - N_("WINE"), - }, }, }; -#define SIZE_OF_MENU_TABLE 4 - #endif // FDO_GEN_MENU_STRUCTURE_H