- Tag more strings
- Refresh English po file, 88 new strings
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -54,9 +54,10 @@ import syndie.util.StringUtil;
|
||||
*
|
||||
*/
|
||||
public class ImageBuilderPopup {
|
||||
private Shell _parent;
|
||||
private final Shell _parent;
|
||||
private final TranslationRegistry _translationRegistry;
|
||||
private Shell _shell;
|
||||
private ImageBuilderSource _page;
|
||||
private final ImageBuilderSource _page;
|
||||
private Composite _choices;
|
||||
private Button _choiceAttach;
|
||||
private Combo _choiceAttachCombo;
|
||||
@ -91,9 +92,10 @@ public class ImageBuilderPopup {
|
||||
|
||||
private boolean _forBodyBackground;
|
||||
|
||||
public ImageBuilderPopup(Shell parent, ImageBuilderSource page) {
|
||||
public ImageBuilderPopup(Shell parent, TranslationRegistry registry, ImageBuilderSource page) {
|
||||
_page = page;
|
||||
_parent = parent;
|
||||
_translationRegistry = registry;
|
||||
initComponents();
|
||||
}
|
||||
|
||||
@ -115,9 +117,13 @@ public class ImageBuilderPopup {
|
||||
public void insertAtCaret(String html);
|
||||
}
|
||||
|
||||
private String getText(String s) {
|
||||
return _translationRegistry.getText(s);
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
_shell = new Shell(_parent, SWT.SHELL_TRIM | SWT.PRIMARY_MODAL);
|
||||
_shell.setText("Include image...");
|
||||
_shell.setText(getText("Include image") + "...");
|
||||
_shell.setLayout(new GridLayout(1, true));
|
||||
|
||||
_choices = new Composite(_shell, SWT.NONE);
|
||||
@ -125,7 +131,7 @@ public class ImageBuilderPopup {
|
||||
_choices.setLayout(new GridLayout(3, false));
|
||||
|
||||
_choiceAttach = new Button(_choices, SWT.RADIO);
|
||||
_choiceAttach.setText("Attachment:");
|
||||
_choiceAttach.setText(getText("Attachment") + ':');
|
||||
_choiceAttach.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
_choiceAttach.addSelectionListener(new ChoiceUpdateListener());
|
||||
|
||||
@ -134,7 +140,7 @@ public class ImageBuilderPopup {
|
||||
_choiceAttachCombo.addSelectionListener(new ChoiceUpdateListener());
|
||||
|
||||
_choiceFile = new Button(_choices, SWT.RADIO);
|
||||
_choiceFile.setText("File:");
|
||||
_choiceFile.setText(getText("File") + ':');
|
||||
_choiceFile.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
_choiceFile.addSelectionListener(new ChoiceFileUpdateListener());
|
||||
|
||||
@ -144,7 +150,7 @@ public class ImageBuilderPopup {
|
||||
_choiceFileText.addModifyListener(new ChoiceFileUpdateListener());
|
||||
|
||||
_choiceFileBrowse = new Button(_choices, SWT.PUSH);
|
||||
_choiceFileBrowse.setText("Browse...");
|
||||
_choiceFileBrowse.setText(getText("Browse") + "...");
|
||||
_choiceFileBrowse.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_choiceFileBrowse.addSelectionListener(new SelectionListener() {
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { browse(); }
|
||||
@ -162,7 +168,7 @@ public class ImageBuilderPopup {
|
||||
_config.setLayout(new GridLayout(6, false));
|
||||
|
||||
_configPreview = new Button(_config, SWT.CHECK);
|
||||
_configPreview.setText("Preview");
|
||||
_configPreview.setText(getText("Preview"));
|
||||
_configPreview.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, true, false, 7, 1));
|
||||
_configPreview.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { refreshPreview(); }
|
||||
@ -173,7 +179,7 @@ public class ImageBuilderPopup {
|
||||
_configPreviewCanvas.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 1, 5));
|
||||
|
||||
_configResizeTo = new Label(_config, SWT.NONE);
|
||||
_configResizeTo.setText("Resize to:");
|
||||
_configResizeTo.setText(getText("Resize to") + ':');
|
||||
_configResizeTo.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_configResizeToCombo = new Combo(_config, SWT.DROP_DOWN);
|
||||
@ -191,7 +197,7 @@ public class ImageBuilderPopup {
|
||||
});
|
||||
|
||||
_configResizeAlt = new Label(_config, SWT.NONE);
|
||||
_configResizeAlt.setText("or:");
|
||||
_configResizeAlt.setText(getText("or") + ':');
|
||||
_configResizeAlt.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_configResizeWidth = new Text(_config, SWT.SINGLE | SWT.BORDER);
|
||||
@ -227,19 +233,19 @@ public class ImageBuilderPopup {
|
||||
_configResizePx.setText("px");
|
||||
|
||||
_configSize = new Label(_config, SWT.NONE);
|
||||
_configSize.setText("Size:");
|
||||
_configSize.setText(getText("Size") + ':');
|
||||
_configSize.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_configSizeAmount = new Label(_config, SWT.NONE);
|
||||
_configSizeAmount.setText("0KB");
|
||||
_configSizeAmount.setText("0 KB");
|
||||
_configSizeAmount.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 4, 1));
|
||||
|
||||
_configThumbnail = new Button(_config, SWT.CHECK);
|
||||
_configThumbnail.setText("show a thumbnail in the page");
|
||||
_configThumbnail.setText(getText("Show a thumbnail in the page"));
|
||||
_configThumbnail.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 5, 1));
|
||||
|
||||
_configStrip = new Button(_config, SWT.CHECK);
|
||||
_configStrip.setText("strip exif data from the image");
|
||||
_configStrip.setText(getText("Strip EXIF data from the image"));
|
||||
_configStrip.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 5, 1));
|
||||
|
||||
Composite actions = new Composite(_shell, SWT.NONE);
|
||||
@ -247,14 +253,14 @@ public class ImageBuilderPopup {
|
||||
actions.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
|
||||
|
||||
_ok = new Button(actions, SWT.PUSH);
|
||||
_ok.setText("ok");
|
||||
_ok.setText(getText("OK"));
|
||||
_ok.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { imageAccepted(); hide(); }
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { imageAccepted(); hide(); }
|
||||
});
|
||||
|
||||
_cancel = new Button(actions, SWT.PUSH);
|
||||
_cancel.setText("cancel");
|
||||
_cancel.setText(getText("Cancel"));
|
||||
_cancel.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { hide(); }
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { hide(); }
|
||||
|
@ -173,7 +173,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
|
||||
private void initComponents() {
|
||||
_shell = new Shell(_parentShell, SWT.SHELL_TRIM | SWT.PRIMARY_MODAL);
|
||||
_shell.setText("Link to...");
|
||||
_shell.setText(getText("Link to") + "...");
|
||||
GridLayout gl = new GridLayout(2, false);
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.verticalSpacing = 0;
|
||||
@ -183,7 +183,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
|
||||
_textLabel = new Label(_shell, SWT.NONE);
|
||||
_textLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
_textLabel.setText("Link text:");
|
||||
_textLabel.setText(getText("Link text") + ':');
|
||||
|
||||
_text = new Text(_shell, SWT.SINGLE | SWT.BORDER);
|
||||
_text.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
|
||||
@ -216,18 +216,18 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndieDetail.setLayoutData(gd);
|
||||
|
||||
_linkTypeSyndieText = new Text(_syndieDetail, SWT.SINGLE | SWT.BORDER);
|
||||
_linkTypeSyndieText.setToolTipText("Full syndie URL");
|
||||
_linkTypeSyndieText.setToolTipText(getText("Full Syndie URL"));
|
||||
_linkTypeSyndieText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
|
||||
|
||||
_syndieForumLabel = new Label(_syndieDetail, SWT.NONE);
|
||||
_syndieForumLabel.setText("Forum: ");
|
||||
_syndieForumLabel.setText(getText("Forum") + ": ");
|
||||
_syndieForumLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false));
|
||||
_syndieForum = new Text(_syndieDetail, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
|
||||
_syndieForum.setText("");
|
||||
_syndieForum.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
|
||||
|
||||
_syndieForumBrowse = new Button(_syndieDetail, SWT.PUSH);
|
||||
_syndieForumBrowse.setText("Browse...");
|
||||
_syndieForumBrowse.setText(getText("Browse") + "...");
|
||||
_syndieForumBrowse.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { pickForum(); }
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { pickForum(); }
|
||||
@ -235,13 +235,13 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndieForumBrowse.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_syndieMessageLabel = new Label(_syndieDetail, SWT.NONE);
|
||||
_syndieMessageLabel.setText("Message: ");
|
||||
_syndieMessageLabel.setText(getText("Message") + ": ");
|
||||
_syndieMessage = new Text(_syndieDetail, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
|
||||
_syndieMessage.setText("");
|
||||
_syndieMessage.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
|
||||
|
||||
_syndieMessageBrowse = new Button(_syndieDetail, SWT.PUSH);
|
||||
_syndieMessageBrowse.setText("Browse...");
|
||||
_syndieMessageBrowse.setText(getText("Browse") + "...");
|
||||
_syndieMessageBrowse.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { pickMessage(); }
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { pickMessage(); }
|
||||
@ -258,12 +258,12 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndieMessageDetailGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
|
||||
|
||||
_syndieMessageDetailGeneral = new Button(_syndieMessageDetailGroup, SWT.RADIO);
|
||||
_syndieMessageDetailGeneral.setText("Link to the message as a whole");
|
||||
_syndieMessageDetailGeneral.setText(getText("Link to the message as a whole"));
|
||||
_syndieMessageDetailGeneral.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1));
|
||||
_syndieMessageDetailGeneral.addSelectionListener(new UpdateURIListener());
|
||||
|
||||
_syndieMessageDetailPage = new Button(_syndieMessageDetailGroup, SWT.RADIO);
|
||||
_syndieMessageDetailPage.setText("Page: ");
|
||||
_syndieMessageDetailPage.setText(getText("Page") + ": ");
|
||||
_syndieMessageDetailPage.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_syndieMessageDetailPage.addSelectionListener(new UpdateURIListener());
|
||||
|
||||
@ -276,7 +276,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
//_syndieMessageDetailPageView.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
|
||||
_syndieMessageDetailAttachment = new Button(_syndieMessageDetailGroup, SWT.RADIO);
|
||||
_syndieMessageDetailAttachment.setText("Attachment: ");
|
||||
_syndieMessageDetailAttachment.setText(getText("Attachment") + ": ");
|
||||
_syndieMessageDetailAttachment.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_syndieMessageDetailAttachment.addSelectionListener(new UpdateURIListener());
|
||||
|
||||
@ -297,7 +297,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndieReadKeyLine.setLayout(gl);
|
||||
_syndieReadKeyLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
|
||||
_syndieReadKey = new Button(_syndieReadKeyLine, SWT.CHECK);
|
||||
_syndieReadKey.setText("include read key");
|
||||
_syndieReadKey.setText(getText("Include read key"));
|
||||
_syndieReadKey.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_syndieReadKey.addSelectionListener(new UpdateURIListener());
|
||||
_syndieReadKeyCombo = new Combo(_syndieReadKeyLine, SWT.DROP_DOWN | SWT.READ_ONLY);
|
||||
@ -313,7 +313,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndiePostKeyLine.setLayout(gl);
|
||||
_syndiePostKeyLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
|
||||
_syndiePostKey = new Button(_syndiePostKeyLine, SWT.CHECK);
|
||||
_syndiePostKey.setText("include post key");
|
||||
_syndiePostKey.setText(getText("Include post key"));
|
||||
_syndiePostKey.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_syndiePostKey.addSelectionListener(new UpdateURIListener());
|
||||
_syndiePostKeyCombo = new Combo(_syndiePostKeyLine, SWT.DROP_DOWN | SWT.READ_ONLY);
|
||||
@ -329,7 +329,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndieReplyKeyLine.setLayout(gl);
|
||||
_syndieReplyKeyLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
|
||||
_syndieReplyKey = new Button(_syndieReplyKeyLine, SWT.CHECK);
|
||||
_syndieReplyKey.setText("include reply key");
|
||||
_syndieReplyKey.setText(getText("Include reply key"));
|
||||
_syndieReplyKey.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_syndieReplyKey.addSelectionListener(new UpdateURIListener());
|
||||
_syndieReplyKeyCombo = new Combo(_syndieReplyKeyLine, SWT.DROP_DOWN | SWT.READ_ONLY);
|
||||
@ -345,7 +345,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_syndieManageKeyLine.setLayout(gl);
|
||||
_syndieManageKeyLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
|
||||
_syndieManageKey = new Button(_syndieManageKeyLine, SWT.CHECK);
|
||||
_syndieManageKey.setText("include manage key");
|
||||
_syndieManageKey.setText(getText("Include manage key"));
|
||||
_syndieManageKey.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_syndieManageKey.addSelectionListener(new UpdateURIListener());
|
||||
_syndieManageKeyCombo = new Combo(_syndieManageKeyLine, SWT.DROP_DOWN | SWT.READ_ONLY);
|
||||
@ -364,7 +364,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_linkTypeI2PRow.setLayout(gl);
|
||||
|
||||
_linkTypeI2PNameLabel = new Label(_linkTypeI2PRow, SWT.NONE);
|
||||
_linkTypeI2PNameLabel.setText("Name:");
|
||||
_linkTypeI2PNameLabel.setText(getText("Name") + ':');
|
||||
_linkTypeI2PNameLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_linkTypeI2PName = new Text(_linkTypeI2PRow, SWT.SINGLE | SWT.BORDER);
|
||||
@ -374,7 +374,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_linkTypeI2PName.setLayoutData(gd);
|
||||
|
||||
_linkTypeI2PDestinationLabel = new Label(_linkTypeI2PRow, SWT.NONE);
|
||||
_linkTypeI2PDestinationLabel.setText("Destination:");
|
||||
_linkTypeI2PDestinationLabel.setText(getText("Destination") + ':');
|
||||
_linkTypeI2PDestinationLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_linkTypeI2PDestination = new Text(_linkTypeI2PRow, SWT.SINGLE | SWT.BORDER);
|
||||
@ -395,7 +395,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_linkTypeEepsiteRow.setLayout(gl);
|
||||
|
||||
_linkTypeEepsiteNameLabel = new Label(_linkTypeEepsiteRow, SWT.NONE);
|
||||
_linkTypeEepsiteNameLabel.setText("Name:");
|
||||
_linkTypeEepsiteNameLabel.setText(getText("Name") + ':');
|
||||
_linkTypeEepsiteNameLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_linkTypeEepsiteName = new Text(_linkTypeEepsiteRow, SWT.SINGLE | SWT.BORDER);
|
||||
@ -405,7 +405,7 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
_linkTypeEepsiteName.setLayoutData(gd);
|
||||
|
||||
_linkTypeEepsiteDestinationLabel = new Label(_linkTypeEepsiteRow, SWT.NONE);
|
||||
_linkTypeEepsiteDestinationLabel.setText("Destination:");
|
||||
_linkTypeEepsiteDestinationLabel.setText(getText("Destination") + ':');
|
||||
_linkTypeEepsiteDestinationLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
|
||||
|
||||
_linkTypeEepsiteDestination = new Text(_linkTypeEepsiteRow, SWT.SINGLE | SWT.BORDER);
|
||||
@ -429,13 +429,13 @@ public class LinkBuilderPopup extends BaseComponent implements ReferenceChooserT
|
||||
actionRow.setLayoutData(gd);
|
||||
|
||||
_actionOk = new Button(actionRow, SWT.PUSH);
|
||||
_actionOk.setText("OK");
|
||||
_actionOk.setText(getText("OK"));
|
||||
_actionOk.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { onOk(); }
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { onOk(); }
|
||||
});
|
||||
_actionCancel = new Button(actionRow, SWT.PUSH);
|
||||
_actionCancel.setText("Cancel");
|
||||
_actionCancel.setText(getText("Cancel"));
|
||||
_actionCancel.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { onCancel(); }
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { onCancel(); }
|
||||
|
@ -66,7 +66,7 @@ public class MessageChooserPopup implements MessageTree.MessageTreeListener, The
|
||||
});
|
||||
|
||||
_cancel = new Button(_shell, SWT.PUSH);
|
||||
_cancel.setText("cancel");
|
||||
_cancel.setText(_translationRegistry.getText("Cancel"));
|
||||
_cancel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
|
||||
_cancel.addSelectionListener(new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent selectionEvent) { hide(); }
|
||||
|
@ -1755,7 +1755,7 @@ public class MessageEditor extends BaseComponent implements Themeable, Translata
|
||||
public void showImagePopup(boolean forBodyBackground) {
|
||||
if (_imagePopup == null) {
|
||||
Properties prefs = _client.getNymPrefs();
|
||||
_imagePopup = new ImageBuilderPopup(_root.getShell(), this);
|
||||
_imagePopup = new ImageBuilderPopup(_root.getShell(), _translationRegistry, this);
|
||||
_imagePopup.setFilterPath(prefs.getProperty("editor.defaultImagePath"));
|
||||
}
|
||||
_imagePopup.showPopup(forBodyBackground);
|
||||
@ -2057,13 +2057,13 @@ public class MessageEditor extends BaseComponent implements Themeable, Translata
|
||||
public void widgetSelected(SelectionEvent selectionEvent) { pickPrivacy(_privacy.getSelectionIndex()); }
|
||||
});
|
||||
|
||||
_hideHeaderButton.setText("Hide");
|
||||
_subjectLabel.setText("Subject:");
|
||||
_tagLabel.setText("Tags:");
|
||||
_authorLabel.setText("Author:");
|
||||
_signAsLabel.setText("Signed by:");
|
||||
_authorHidden.setText("Hidden?");
|
||||
_privacyLabel.setText("Privacy:");
|
||||
_hideHeaderButton.setText(getText("Hide"));
|
||||
_subjectLabel.setText(getText("Subject") + ':');
|
||||
_tagLabel.setText(getText("Tags") + ':');
|
||||
_authorLabel.setText(getText("Author") + ':');
|
||||
_signAsLabel.setText(getText("Signed by") + ':');
|
||||
_authorHidden.setText(getText("Hidden?"));
|
||||
_privacyLabel.setText(getText("Privacy") + ':');
|
||||
}
|
||||
|
||||
private void initAbbrHeader() {
|
||||
|
@ -26,16 +26,16 @@ import syndie.data.SyndieURI;
|
||||
import syndie.db.DBClient;
|
||||
|
||||
public class MessageEditorToolbar implements MessageEditor.EditorStatusListener {
|
||||
private Composite _parent;
|
||||
private MessageEditor _editor;
|
||||
private BookmarkControl _bookmarkControl;
|
||||
private DBClient _client;
|
||||
private TranslationRegistry _translationRegistry;
|
||||
private final Composite _parent;
|
||||
private final MessageEditor _editor;
|
||||
private final BookmarkControl _bookmarkControl;
|
||||
private final DBClient _client;
|
||||
private final TranslationRegistry _translationRegistry;
|
||||
|
||||
private int buttonWidth = 32;
|
||||
private int buttonHeight = 32;
|
||||
|
||||
private CoolBar _toolbar;
|
||||
private final CoolBar _toolbar;
|
||||
// forum control
|
||||
private Button _forumButton;
|
||||
private Image _forumAvatar;
|
||||
@ -287,12 +287,16 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
return addButton(tg, SWT.TOGGLE, tooltip, image, listener);
|
||||
}
|
||||
|
||||
private String getText(String s) {
|
||||
return _translationRegistry.getText(s);
|
||||
}
|
||||
|
||||
public void initForumControl(ToolbarGroup tg) {
|
||||
_forumMenu = new Menu(_parent);
|
||||
SelectionListener listener = new FireSelectionListener() {
|
||||
public void fire() { _editor.pickForum(); }
|
||||
};
|
||||
_forumButton = addFlatButton(tg, "Select the forum to post in", ImageUtil.ICON_EDITOR_NOT_BOOKMARKED, listener);
|
||||
_forumButton = addFlatButton(tg, getText("Select the forum to post in"), ImageUtil.ICON_EDITOR_NOT_BOOKMARKED, listener);
|
||||
}
|
||||
|
||||
public void initAuthorControl(ToolbarGroup tg) {
|
||||
@ -300,7 +304,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
SelectionListener listener = new FireSelectionListener() {
|
||||
public void fire() { _editor.pickAuthor(); }
|
||||
};
|
||||
_authorButton = addFlatButton(tg, "Who do you want to sign the post as?", ImageUtil.ICON_EDITOR_BOOKMARKED_NOAVATAR, listener);
|
||||
_authorButton = addFlatButton(tg, getText("Who do you want to sign the post as?"), ImageUtil.ICON_EDITOR_BOOKMARKED_NOAVATAR, listener);
|
||||
}
|
||||
|
||||
public void initPrivacyControl(ToolbarGroup tg) {
|
||||
@ -308,7 +312,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
SelectionListener listener = new FireSelectionListener() {
|
||||
public void fire() { _privMenu.setVisible(true); }
|
||||
};
|
||||
_privButton = addFlatButton(tg,"Who is allowed to read the post?", ImageUtil.ICON_EDITOR_PRIVACY_AUTHORIZED, listener);
|
||||
_privButton = addFlatButton(tg,getText("Who is allowed to read the post?"), ImageUtil.ICON_EDITOR_PRIVACY_AUTHORIZED, listener);
|
||||
|
||||
_privPublic = new MenuItem(_privMenu, SWT.PUSH);
|
||||
_privAuthorized = new MenuItem(_privMenu, SWT.PUSH);
|
||||
@ -335,10 +339,10 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
|
||||
_privAuthorized.setSelection(true);
|
||||
|
||||
_privPublic.setText("Anyone can read the post");
|
||||
_privAuthorized.setText("Authorized readers of the forum can read the post");
|
||||
_privPBE.setText("Passphrase required to read the post...");
|
||||
_privReply.setText("Only forum administrators can read the post");
|
||||
_privPublic.setText(getText("Anyone can read the post"));
|
||||
_privAuthorized.setText(getText("Authorized readers of the forum can read the post"));
|
||||
_privPBE.setText(getText("Passphrase required to read the post") + "...");
|
||||
_privReply.setText(getText("Only forum administrators can read the post"));
|
||||
_privAuthorized.setSelection(true);
|
||||
}
|
||||
|
||||
@ -347,7 +351,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _editor.togglePageType(); }
|
||||
};
|
||||
|
||||
_pageTypeButton = addToggleButton(tg, "Toggle the type of the current page", ImageUtil.ICON_EDITOR_TOGGLETYPE, listener);
|
||||
_pageTypeButton = addToggleButton(tg, getText("Toggle the type of the current page"), ImageUtil.ICON_EDITOR_TOGGLETYPE, listener);
|
||||
}
|
||||
|
||||
public void initPageAddControl(ToolbarGroup tg) {
|
||||
@ -355,7 +359,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _editor.addPage(); }
|
||||
};
|
||||
|
||||
_pageAddButton = addFlatButton(tg, "Add a new blank page", ImageUtil.ICON_EDITOR_ADDPAGE, listener);
|
||||
_pageAddButton = addFlatButton(tg, getText("Add a new blank page"), ImageUtil.ICON_EDITOR_ADDPAGE, listener);
|
||||
}
|
||||
|
||||
public void initPageRemoveControl(ToolbarGroup tg) {
|
||||
@ -363,7 +367,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _editor.removePage(); }
|
||||
};
|
||||
|
||||
_pageRemoveButton = addFlatButton(tg, "Remove the current page", ImageUtil.ICON_EDITOR_REMOVEPAGE, listener);
|
||||
_pageRemoveButton = addFlatButton(tg, getText("Remove the current page"), ImageUtil.ICON_EDITOR_REMOVEPAGE, listener);
|
||||
}
|
||||
|
||||
public void initWebRipControl(ToolbarGroup tg) {
|
||||
@ -371,7 +375,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _editor.addWebRip(); }
|
||||
};
|
||||
|
||||
_webRipButton = addFlatButton(tg, "Rip a web page and add it as a new page in the message", ImageUtil.ICON_EDITOR_WEBRIP, listener);
|
||||
_webRipButton = addFlatButton(tg, getText("Rip a web page and add it as a new page in the message"), ImageUtil.ICON_EDITOR_WEBRIP, listener);
|
||||
}
|
||||
|
||||
public void initAddImageAttachmentControl(ToolbarGroup tg) {
|
||||
@ -379,21 +383,21 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _editor.showImagePopup(false); }
|
||||
};
|
||||
|
||||
_addImageAttachmentButton = addFlatButton(tg, "Insert a new image into the current page", ImageUtil.ICON_EDITOR_ADDIMAGE, listener);
|
||||
_addImageAttachmentButton = addFlatButton(tg, getText("Insert a new image into the current page"), ImageUtil.ICON_EDITOR_ADDIMAGE, listener);
|
||||
}
|
||||
|
||||
public void initAddAttachmentControl(ToolbarGroup tg) {
|
||||
SelectionListener listener = new FireSelectionListener() {
|
||||
public void fire() { _editor.addAttachment(); }
|
||||
};
|
||||
_addAttachmentButton = addFlatButton(tg, "Manage attachments to this post", ImageUtil.ICON_EDITOR_ADDFILE, listener);
|
||||
_addAttachmentButton = addFlatButton(tg, getText("Manage attachments to this post"), ImageUtil.ICON_EDITOR_ADDFILE, listener);
|
||||
}
|
||||
|
||||
public void initRemoveAttachmentControl(ToolbarGroup tg) {
|
||||
SelectionListener listener = new FireSelectionListener() {
|
||||
public void fire() { _editor.removeAttachment(); }
|
||||
};
|
||||
_removeAttachmentButton = addFlatButton(tg, "Remove the selected attachment", ImageUtil.ICON_EDITOR_REMOVEFILE, listener);
|
||||
_removeAttachmentButton = addFlatButton(tg, getText("Remove the selected attachment"), ImageUtil.ICON_EDITOR_REMOVEFILE, listener);
|
||||
}
|
||||
|
||||
public void initLinkControl(ToolbarGroup tg) {
|
||||
@ -402,7 +406,7 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _linkMenu.setVisible(true); }
|
||||
};
|
||||
|
||||
_linkButton = addFlatButton(tg, "Add a new link", ImageUtil.ICON_EDITOR_LINK, listener);
|
||||
_linkButton = addFlatButton(tg, getText("Add a new link"), ImageUtil.ICON_EDITOR_LINK, listener);
|
||||
|
||||
_linkWeb = new MenuItem(_linkMenu, SWT.PUSH);
|
||||
new MenuItem(_linkMenu, SWT.SEPARATOR);
|
||||
@ -463,16 +467,16 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
public void fire() { _editor.showLinkPopup(false, false, false, true, false, false, false, false, false, false); }
|
||||
});
|
||||
|
||||
_linkWeb.setText("Link to a website");
|
||||
_linkPage.setText("Link to a page in this message");
|
||||
_linkAttach.setText("Link to an attachment in this message");
|
||||
_linkForum.setText("Link to a forum");
|
||||
_linkMsg.setText("Link to a particular Syndie message");
|
||||
_linkEepsite.setText("Link to an I2P eepsite");
|
||||
_linkI2P.setText("Link to an I2P destination");
|
||||
_linkFreenet.setText("Link to a Freenet freesite");
|
||||
_linkArchive.setText("Link to a Syndie archive");
|
||||
_linkOther.setText("Link to another Syndie URI");
|
||||
_linkWeb.setText(getText("Link to a website"));
|
||||
_linkPage.setText(getText("Link to a page in this message"));
|
||||
_linkAttach.setText(getText("Link to an attachment in this message"));
|
||||
_linkForum.setText(getText("Link to a forum"));
|
||||
_linkMsg.setText(getText("Link to a particular Syndie message"));
|
||||
_linkEepsite.setText(getText("Link to an I2P eepsite"));
|
||||
_linkI2P.setText(getText("Link to an I2P destination"));
|
||||
_linkFreenet.setText(getText("Link to a Freenet freesite"));
|
||||
_linkArchive.setText(getText("Link to a Syndie archive"));
|
||||
_linkOther.setText(getText("Link to another Syndie URI"));
|
||||
}
|
||||
|
||||
public void initStyleControl(ToolbarGroup tg) {
|
||||
@ -543,20 +547,20 @@ public class MessageEditorToolbar implements MessageEditor.EditorStatusListener
|
||||
_stylePre = new MenuItem(_styleMenu, SWT.PUSH);
|
||||
_stylePre.addSelectionListener(new InsertListener("<pre>first line\n\tindented line</pre>", true));
|
||||
|
||||
_styleText.setText("Styled text...");
|
||||
_styleImage.setText("Image...");
|
||||
_styleBGColor.setText("Page background color");
|
||||
_styleBGColorDefault.setText("standard");
|
||||
_styleBGImage.setText("Page background image...");
|
||||
_styleListOrdered.setText("List (ordered)");
|
||||
_styleListUnordered.setText("List (unordered)");
|
||||
_styleHeading.setText("Heading");
|
||||
_styleHeading1.setText("Heading 1 (largest)");
|
||||
_styleHeading2.setText("Heading 2");
|
||||
_styleHeading3.setText("Heading 3");
|
||||
_styleHeading4.setText("Heading 4");
|
||||
_styleHeading5.setText("Heading 5 (smallest)");
|
||||
_stylePre.setText("Preformatted text");
|
||||
_styleText.setText(getText("Styled text") + "...");
|
||||
_styleImage.setText(getText("Image") + "...");
|
||||
_styleBGColor.setText(getText("Page background color"));
|
||||
_styleBGColorDefault.setText(getText("standard"));
|
||||
_styleBGImage.setText(getText("Page background image") + "...");
|
||||
_styleListOrdered.setText(getText("List (ordered)"));
|
||||
_styleListUnordered.setText(getText("List (unordered)"));
|
||||
_styleHeading.setText(getText("Heading"));
|
||||
_styleHeading1.setText(getText("Heading 1 (largest)"));
|
||||
_styleHeading2.setText(getText("Heading 2"));
|
||||
_styleHeading3.setText(getText("Heading 3"));
|
||||
_styleHeading4.setText(getText("Heading 4"));
|
||||
_styleHeading5.setText(getText("Heading 5 (smallest)"));
|
||||
_stylePre.setText(getText("Preformatted text"));
|
||||
}
|
||||
|
||||
/** simple hook to inert a buffer at the caret */
|
||||
|
@ -308,8 +308,7 @@ public class MessageView extends BaseComponent implements Translatable, Themeabl
|
||||
|
||||
String date = DateTime.getDateTime(msg.getMessageId());
|
||||
String impDate = DateTime.getDate(_client.getMessageImportDate(msg.getInternalId()));
|
||||
// fixme translate
|
||||
_headerDate.setText(date + " [Imported " + impDate + "]");
|
||||
_headerDate.setText(date + " [" + getText("Imported") + ' ' + impDate + ']');
|
||||
|
||||
Set tags = new TreeSet(msg.getPublicTags());
|
||||
tags.addAll(msg.getPrivateTags());
|
||||
|
@ -1116,9 +1116,9 @@ public class NymChannelTree implements Themeable, Translatable {
|
||||
else
|
||||
item.setText(4, "");
|
||||
|
||||
// TODO what is this? TODO translate
|
||||
// TODO what is this?
|
||||
if (r.referencesIncluded)
|
||||
item.setText(5, "with references");
|
||||
item.setText(5, _translationRegistry.getText("with references"));
|
||||
else
|
||||
item.setText(5, "");
|
||||
|
||||
|
Reference in New Issue
Block a user