diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-06-11 09:53:40 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-06-11 09:53:40 -0400 |
commit | c97954f0144e9f91775ff96896d9533624a91c00 (patch) | |
tree | 1d309b6ebd9ce0e259dc217917a58b714dc9f2ec /apps/plugins/text_viewer/text_viewer.c | |
parent | 8c6b579b32072dfdf07c5859917262654bb55e98 (diff) | |
download | rockbox-c97954f0144e9f91775ff96896d9533624a91c00.tar.gz rockbox-c97954f0144e9f91775ff96896d9533624a91c00.zip |
FS#13434: Partially internationalize the textviewer plugin
* Converted over all previously-translated strings
* Lots of comments added to mark the next phase
* Voice filename of the file being loaded if possible
Change-Id: Ia3219bbfa4505ad29a25bcf1d6eacc94c59a2a83
Diffstat (limited to 'apps/plugins/text_viewer/text_viewer.c')
-rw-r--r-- | apps/plugins/text_viewer/text_viewer.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c index fea0977c0d..91c3ae9237 100644 --- a/apps/plugins/text_viewer/text_viewer.c +++ b/apps/plugins/text_viewer/text_viewer.c | |||
@@ -31,7 +31,7 @@ | |||
31 | enum plugin_status plugin_start(const void* file) | 31 | enum plugin_status plugin_start(const void* file) |
32 | { | 32 | { |
33 | int button; | 33 | int button; |
34 | #if defined(TV_AUTOSCROLL_PRE) | 34 | #if defined(TV_AUTOSCROLL_PRE) |
35 | int lastbutton = BUTTON_NONE; | 35 | int lastbutton = BUTTON_NONE; |
36 | #endif | 36 | #endif |
37 | bool autoscroll = false; | 37 | bool autoscroll = false; |
@@ -50,12 +50,20 @@ enum plugin_status plugin_start(const void* file) | |||
50 | plugin_buf = rb->plugin_get_buffer(&size); | 50 | plugin_buf = rb->plugin_get_buffer(&size); |
51 | 51 | ||
52 | if (!tv_init_action(&plugin_buf, &size)) { | 52 | if (!tv_init_action(&plugin_buf, &size)) { |
53 | rb->splash(HZ, "Error initialize"); | 53 | rb->splashf(HZ, ID2P(LANG_ERROR_FORMATSTR), "initialize"); |
54 | return PLUGIN_ERROR; | 54 | return PLUGIN_ERROR; |
55 | } | 55 | } |
56 | 56 | ||
57 | /* Voice that we're loading the file... */ | ||
58 | if (rb->global_settings->talk_menu) { | ||
59 | rb->talk_id(LANG_WAIT, true); | ||
60 | rb->talk_file_or_spell(NULL, file, NULL, true); | ||
61 | rb->talk_force_enqueue_next(); | ||
62 | } | ||
63 | // rb->splashf(HZ/2, "%s %s", rb->str(LANG_WAIT), file); | ||
64 | |||
57 | if (!tv_load_file(file)) { | 65 | if (!tv_load_file(file)) { |
58 | rb->splash(HZ, "Error opening file"); | 66 | rb->splashf(HZ, ID2P(LANG_ERROR_FORMATSTR), "reading file"); |
59 | return PLUGIN_ERROR; | 67 | return PLUGIN_ERROR; |
60 | } | 68 | } |
61 | 69 | ||
@@ -215,7 +223,7 @@ enum plugin_status plugin_start(const void* file) | |||
215 | } | 223 | } |
216 | if (button != BUTTON_NONE) | 224 | if (button != BUTTON_NONE) |
217 | { | 225 | { |
218 | #if defined(TV_AUTOSCROLL_PRE) | 226 | #if defined(TV_AUTOSCROLL_PRE) |
219 | lastbutton = button; | 227 | lastbutton = button; |
220 | #endif | 228 | #endif |
221 | rb->yield(); | 229 | rb->yield(); |