Mercurial > projects > mde
comparison mde/lookup/Translation.d @ 103:42e241e7be3e
ContentList content type; getting content items/lists from Options generically via content.Items, and a new addContent widget function. Several improvements to generic handling of content. New button-with-text widget.
Some tidy-up.
Some name changes, to increase uniformity.
Bug-fix: floating widgets of fixed size could previously be made larger than intended from config dimdata.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Tue, 25 Nov 2008 18:01:44 +0000 |
parents | 49e7cfed4b34 |
children | 20f7d813bb0f |
comparison
equal
deleted
inserted
replaced
102:ba035eba07b4 | 103:42e241e7be3e |
---|---|
223 <entry|Str2=["Test 3","Description",bogus,"entries",56]> | 223 <entry|Str2=["Test 3","Description",bogus,"entries",56]> |
224 *********/ | 224 *********/ |
225 | 225 |
226 // Hack a specific locale... | 226 // Hack a specific locale... |
227 // Also to allow unittest to run without init. | 227 // Also to allow unittest to run without init. |
228 char[] currentL10n = miscOpts.L10n; | 228 TextContent realL10n = miscOpts.L10n; |
229 miscOpts.L10n = "test-1"; | 229 miscOpts.L10n = new TextContent ("L10n", "test-1"); |
230 | 230 |
231 Translation transl = load ("unittest/Translation"); | 231 Translation transl = load ("unittest/Translation"); |
232 | 232 |
233 // Simple get-string, check dependancy's entry doesn't override | 233 // Simple get-string, check dependancy's entry doesn't override |
234 assert (transl.entry ("Str1") == "Test 1"); | 234 assert (transl.entry ("Str1") == "Test 1"); |
243 | 243 |
244 // No checks for version info since it's not functionality of this module. | 244 // No checks for version info since it's not functionality of this module. |
245 // Only check extra entries are allowed but ignored. | 245 // Only check extra entries are allowed but ignored. |
246 | 246 |
247 // Restore | 247 // Restore |
248 miscOpts.L10n = currentL10n; | 248 delete miscOpts.L10n; |
249 miscOpts.L10n = realL10n; | |
249 | 250 |
250 logger.info ("Unittest complete."); | 251 logger.info ("Unittest complete."); |
251 } | 252 } |
252 } | 253 } |