Commit graph

21 commits

Author SHA1 Message Date
Eevee
68e14e663e Started switching to create_translation_table.
- Moved the function to its own file.
- Implemented the session-based default language switching.
- Migrated a couple tables.
2011-03-21 22:32:52 -07:00
Eevee
6a9172151a Sigh! Remove support for strings as keys; use Language objects. 2011-03-21 17:54:28 -07:00
Eevee
1da816af4b New i18n schema thing impl, and fixed the new tests to match. 2011-03-20 01:06:45 -07:00
Eevee
542aa670ae Added a test for the i18n dynamic table generation.
It fails spectacularly, but hopefully documents what I'm ultimately
going for.
2011-03-18 18:22:18 -07:00
Petr Viktorin
2f222ca973 Make the string properties mutable 2011-03-13 15:43:42 -07:00
Petr Viktorin
2375c3117c Actually test :foo in test_crash_empty_prefix 2011-03-13 15:43:01 -07:00
Petr Viktorin
bc2707f6c4 Support filtering by strings (Pokemon.name, Pokemon.names['fr'], etc.) 2011-03-13 15:43:01 -07:00
Petr Viktorin
b3c7689d41 Replace all_tables by table_classes; get rid of globals() 2011-03-13 15:43:00 -07:00
Petr Viktorin
d813e24b25 I18n for the database schema
- Helper base class: Named
  Subclasses: OfficiallyNamed, UnofficiallyNamed
  for these, a 'name' column is created in the appropriate text table
  also, they get automatic __str__/__repr__/__unicode__
- Faux columns: ProseColumn, TextColumn
  these become columns in the appropriate text tables
  these text tables (*_text, *_prose) are auto-generated at the end
  the main table gets one property (singular name) that gets the English text
   and one (plural name) with dict of texts keyed by language
- Every named table gets 'identifier'
- Languages compare & hash equal to their identifiers
- Existing foreign-name tables replaced by the autogenerated ones
- order_by: names replaced by identifiers
- New function: all_tables(), yields all tables
- Markdown move properties removed for now
- Schema test suite
2011-03-13 15:10:10 -07:00
Eevee
4414bab714 Lots of encounters were using slots that claimed to be for other games. #297 #281 2011-01-27 20:44:56 -08:00
Eevee
2b6ea2be0a Added tests for form lookup, fixing the suite. 2010-12-01 12:06:45 -08:00
Eevee
cf72e1db36 Crash fix: lookup with empty prefixes. 2010-09-12 21:08:50 -07:00
Eevee
3ea1174a31 Make user and code valid_types not interfere when one is language and the other is table. 2010-08-24 23:49:48 -07:00
Eevee
2431fd6754 Allow restricting lookup by language, with a @ja: prefix. #90 2010-08-24 23:49:47 -07:00
Eevee
79df4768bf Split PokedexLookup(recreate=True) into its own method. #216 2010-05-12 22:38:36 -07:00
Eevee
1d9e24a875 roomaji.py now handles "wu xe" and "shi xi" correctly. #132 2010-04-16 23:09:33 -07:00
Eevee
82e797c6d0 Fixed lookup tests to, um, run. 2010-03-28 22:18:27 -07:00
Eevee
28be0b3c60 Added hiragana support to roomaji.py. #100 2009-09-28 21:29:01 -07:00
Eevee
f5853c0a0b Added random lookup. #57 2009-08-24 22:59:39 -07:00
Eevee
9e3d8b317d Wildcard lookup! #89
Test suite no longer reloads the entire database.  Takes too long.

Factored out some magic numbers in lookup().
2009-08-24 22:04:55 -07:00
Eevee
c0d6828f19 Added lookup tests. #15 2009-08-23 20:43:39 -07:00