1 package be
.nikiroo
.jvcard
.resources
.enums
;
3 import java
.io
.IOException
;
6 import be
.nikiroo
.jvcard
.resources
.Bundles
.Bundle
;
7 import be
.nikiroo
.jvcard
.resources
.Meta
;
10 * The enum representing textual information to be translated to the user as a
13 * Note that each key that should be translated MUST be annotated with a
14 * {@link Meta} annotation.
19 public enum StringId
{
20 DUMMY
, // <-- TODO : remove
21 NULL
, // Special usage, no annotations so it is not visible in
23 @Meta(what
= "a key to press", where
= "action keys", format
= "MUST BE 3 chars long", info
= "Tab key")
25 @Meta(what
= "a key to press", where
= "action keys", format
= "MUST BE 3 chars long", info
= "Enter key")
27 @Meta(what
= "Action key", where
= "All screens except the first (KEY_ACTION_QUIT)", format
= "", info
= "Go back to previous screen")
29 @Meta(what
= "Action key", where
= "MainWindow", format
= "", info
= "Get help text")
31 @Meta(what
= "Action key", where
= "FileList", format
= "", info
= "View the selected card")
32 KEY_ACTION_VIEW_CARD
, //
33 @Meta(what
= "Action key", where
= "ContactList", format
= "", info
= "View the selected contact")
34 KEY_ACTION_VIEW_CONTACT
, //
35 @Meta(what
= "Action key", where
= "ContactDetails", format
= "", info
= "Edit the contact")
36 KEY_ACTION_EDIT_CONTACT
, //
37 @Meta(what
= "Action key", where
= "ContactDetails", format
= "", info
= "Edit the contact in RAW mode")
38 KEY_ACTION_EDIT_CONTACT_RAW
, //
39 @Meta(what
= "Action key", where
= "ContactList", format
= "", info
= "Save the whole card")
40 KEY_ACTION_SAVE_CARD
, //
41 @Meta(what
= "", where
= "ContactList", format
= "", info
= "Delete the selected contact")
42 KEY_ACTION_DELETE_CONTACT
, //
43 @Meta(what
= "Action key", where
= "ContactList", format
= "", info
= "Filter the displayed contacts")
45 @Meta(what
= "", where
= "", format
= "we could use: ' ', ┃, │...", info
= "Field separator")
46 DEAULT_FIELD_SEPARATOR
, // MainContentList
47 @Meta(what
= "Action key", where
= "ContactDetails", format
= "", info
= "Invert the photo's colours")
49 @Meta(what
= "Action key", where
= "ContactDetails", format
= "", info
= "Show the photo in 'fullscreen'")
50 KEY_ACTION_FULLSCREEN
, //
51 @Meta(what
= "Action key", where
= "ContactList, ContactDetails, ContactDetailsRaw", format
= "", info
= "Switch between the available display formats")
52 KEY_ACTION_SWITCH_FORMAT
, // multi-usage
53 @Meta(what
= "Action key", where
= "Contact list, Edit Contact", format
= "", info
= "Add a new contact/field")
55 @Meta(what
= "User question: TEXT", where
= "Contact list", format
= "", info
= "New contact")
56 ASK_USER_CONTACT_NAME
, //
57 @Meta(what
= "User question: [Y|N]", where
= "Contact list", format
= "%s = contact name", info
= "Delete contact")
58 CONFIRM_USER_DELETE_CONTACT
, //
59 @Meta(what
= "Error", where
= "Contact list", format
= "%s = contact name", info
= "cannot delete a contact")
60 ERR_CANNOT_DELETE_CONTACT
, //
65 * Write the header found in the configuration <tt>.properties</tt> file of
66 * this {@link Bundle}.
69 * the {@link Writer} to write the header in
76 static public void writeHeader(Writer writer
, String name
)
78 writer
.write("# " + name
+ " translation file (UTF-8)\n");
80 writer
.write("# Note that any key can be doubled with a _NOUTF suffix\n");
81 writer
.write("# to use when the flag --noutf is passed\n");
83 writer
.write("# Also, the comments always refer to the key below them.\n");