/ i18n / Afrikaans.cpp
Afrikaans.cpp
 1  /*
 2  * Copyright (c) 2021-2026, The PurpleI2P Project
 3  *
 4  * This file is part of Purple i2pd project and licensed under BSD3
 5  *
 6  * See full license text in LICENSE file at top of project tree
 7  */
 8  
 9  #include <map>
10  #include <vector>
11  #include <string>
12  #include <memory>
13  #include "I18N.h"
14  
15  // Afrikaans localization file
16  
17  namespace i2p
18  {
19  namespace i18n
20  {
21  namespace afrikaans // language namespace
22  {
23  	// language name in lowercase
24  	static std::string language = "afrikaans";
25  
26  	// See for language plural forms here:
27  	// https://localization-guide.readthedocs.io/en/latest/l10n/pluralforms.html
28  	static int plural (int n) {
29  		return n != 1 ? 1 : 0;
30  	}
31  
32  	// Right to Left language?
33  	static bool rtl = false;
34  
35  	static const LocaleStrings strings
36  	{
37  		{"%.2f KiB", "%.2f KiB"},
38  		{"%.2f MiB", "%.2f MiB"},
39  		{"%.2f GiB", "%.2f GiB"},
40  		{"failed", "Het misluk"},
41  		{"unknown", "onbekend"},
42  		{"Main page", "Hoof Blad"},
43  		{"Tunnels", "Tonnels"},
44  		{"I2P tunnels", "I2P tonnels"},
45  		{"SAM sessions", "SAM sessies"},
46  		{"OK", "LEKKER"},
47  		{"Testing", "Besig om te toets"},
48  		{"Firewalled", "Vuurmuur'd"},
49  		{"Unknown", "Onbekend"},
50  		{"Offline", "Aflyn"},
51  		{"Uptime", "Optyd"},
52  		{"Network status", "Netwerk status"},
53  		{"Network status v6", "Netwerk status v6"},
54  		{"Family", "Familie"},
55  		{"Received", "Ontvang"},
56  		{"%.2f KiB/s", "%.2f KiB/s"},
57  		{"Sent", "Gestuur"},
58  		{"Hidden content. Press on text to see.", "Hidden content. Druk om te sien."},
59  		{"Router Ident", "Router Ident"},
60  		{"Router Family", "Router Familie"},
61  		{"Enabled", "Geaktiveer"},
62  		{"Disabled", "Gedeaktiveer"},
63  		{"Change", "Verander"},
64  		{"Change language", "Verander taal"},
65  		{"Description", "Beskrywing"},
66  		{"Submit", "Stuur"},
67  		{"Proxy error", "Proxy-fout"},
68  		{"", ""},
69  	};
70  
71  	static std::map<std::string, std::vector<std::string>> plurals
72  	{
73  		{"%d days", {"%d dag", "%d dae"}},
74  		{"%d hours", {"%d uur", "%d ure"}},
75  		{"%d minutes", {"%d minuut", "%d minute"}},
76  		{"%d seconds", {"%d seconde", "%d sekondes"}},
77  		{"", {"", ""}},
78  	};
79  
80  	std::shared_ptr<const i2p::i18n::Locale> GetLocale()
81  	{
82  		return std::make_shared<i2p::i18n::Locale>(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
83  	}
84  
85  } // language
86  } // i18n
87  } // i2p