mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 684507 - commodity namespace should be localized
This commit is contained in:
committed by
John Ralls
parent
9d458d1e7f
commit
c7f842c081
@@ -21,12 +21,12 @@ class TestCommodityNamespace(CommoditySession):
|
|||||||
#print(self.table.__class__)
|
#print(self.table.__class__)
|
||||||
namespace_names = self.table.get_namespaces()
|
namespace_names = self.table.get_namespaces()
|
||||||
#print(namespace_names)
|
#print(namespace_names)
|
||||||
self.assertEqual(namespace_names, ['AMEX', 'NYSE', 'NASDAQ', 'EUREX', 'FUND', 'template', 'CURRENCY'])
|
self.assertEqual(namespace_names, ['BOND', 'SHARE', 'FUND', 'OPTION', 'template', 'CURRENCY'])
|
||||||
|
|
||||||
def test_namespaces_list(self):
|
def test_namespaces_list(self):
|
||||||
namespaces = self.table.get_namespaces_list()
|
namespaces = self.table.get_namespaces_list()
|
||||||
namespace_names = [ns.get_name() for ns in namespaces]
|
namespace_names = [ns.get_name() for ns in namespaces]
|
||||||
self.assertEqual(namespace_names, ['AMEX', 'NYSE', 'NASDAQ', 'EUREX', 'FUND', 'template', 'CURRENCY'])
|
self.assertEqual(namespace_names, ['BOND', 'SHARE', 'FUND', 'OPTION', 'template', 'CURRENCY'])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -2510,11 +2510,10 @@ gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book)
|
|||||||
gnc_commodity* c;
|
gnc_commodity* c;
|
||||||
|
|
||||||
ENTER ("table=%p", table);
|
ENTER ("table=%p", table);
|
||||||
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_AMEX, book);
|
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_BOND, book);
|
||||||
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_NYSE, book);
|
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_SHARE, book);
|
||||||
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_NASDAQ, book);
|
|
||||||
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_EUREX, book);
|
|
||||||
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_MUTUAL, book);
|
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_MUTUAL, book);
|
||||||
|
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_OPTION, book);
|
||||||
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_TEMPLATE, book);
|
gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_TEMPLATE, book);
|
||||||
c = gnc_commodity_new(book, "template", GNC_COMMODITY_NS_TEMPLATE, "template", "template", 1);
|
c = gnc_commodity_new(book, "template", GNC_COMMODITY_NS_TEMPLATE, "template", "template", 1);
|
||||||
gnc_commodity_table_insert(table, c);
|
gnc_commodity_table_insert(table, c);
|
||||||
|
|||||||
@@ -104,21 +104,19 @@ GType gnc_commodity_namespace_get_type(void);
|
|||||||
* only used to populate an option menu in the commodity selection
|
* only used to populate an option menu in the commodity selection
|
||||||
* window.
|
* window.
|
||||||
*/
|
*/
|
||||||
#define GNC_COMMODITY_NS_LEGACY "GNC_LEGACY_CURRENCIES"
|
#define GNC_COMMODITY_NS_LEGACY "GNC_LEGACY_CURRENCIES"
|
||||||
#define GNC_COMMODITY_NS_TEMPLATE "template"
|
#define GNC_COMMODITY_NS_TEMPLATE "template"
|
||||||
/* The ISO define is deprecated in favor of CURRENCY */
|
/* The ISO define is deprecated in favor of CURRENCY */
|
||||||
#define GNC_COMMODITY_NS_ISO "ISO4217"
|
#define GNC_COMMODITY_NS_ISO "ISO4217"
|
||||||
#define GNC_COMMODITY_NS_CURRENCY "CURRENCY"
|
#define GNC_COMMODITY_NS_CURRENCY "CURRENCY"
|
||||||
#define GNC_COMMODITY_NS_NASDAQ "NASDAQ"
|
#define GNC_COMMODITY_NS_BOND N_("BOND")
|
||||||
#define GNC_COMMODITY_NS_NYSE "NYSE"
|
#define GNC_COMMODITY_NS_SHARE N_("SHARE")
|
||||||
#define GNC_COMMODITY_NS_EUREX "EUREX"
|
#define GNC_COMMODITY_NS_MUTUAL N_("FUND")
|
||||||
#define GNC_COMMODITY_NS_MUTUAL "FUND"
|
#define GNC_COMMODITY_NS_OPTION N_("OPTION")
|
||||||
#define GNC_COMMODITY_NS_AMEX "AMEX"
|
|
||||||
#define GNC_COMMODITY_NS_ASX "ASX"
|
|
||||||
#define GNC_COMMODITY_NS_NONCURRENCY _("All non-currency")
|
#define GNC_COMMODITY_NS_NONCURRENCY _("All non-currency")
|
||||||
/* Delay translation of this one, we use it in both translated and untranslated form
|
/* Delay translation of this one, we use it in both translated and untranslated form
|
||||||
when presenting the currency related namespace to the user */
|
when presenting the currency related namespace to the user */
|
||||||
#define GNC_COMMODITY_NS_ISO_GUI N_("Currencies")
|
#define GNC_COMMODITY_NS_ISO_GUI N_("Currencies")
|
||||||
|
|
||||||
/** Max fraction is 10^9 because 10^10 would require changing it to an
|
/** Max fraction is 10^9 because 10^10 would require changing it to an
|
||||||
* int64_t.
|
* int64_t.
|
||||||
|
|||||||
Reference in New Issue
Block a user