Skip to content

Commit

Permalink
Localization of the "Browse" button in the license import dialog. #1247
Browse files Browse the repository at this point in the history
  • Loading branch information
eparovyshnaya authored and ruspl-afed committed Nov 15, 2023
1 parent 9e7c1cd commit c40d964
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022 ArSysOp
* Copyright (c) 2020, 2023 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,6 +9,7 @@
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.lic.internal.jface.dialogs.licensing;

Expand Down Expand Up @@ -80,7 +81,7 @@ private void buildSelector(Composite parent) {
path = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
path.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
Button browse = new Button(composite, SWT.PUSH);
browse.setText("B&rowse..."); //$NON-NLS-1$
browse.setText(ImportLicenseDialogMessages.ImportLicenseDialog_browse);
browse.addListener(SWT.Selection, e -> browseAndLoad());
setButtonLayoutData(browse);
}
Expand Down
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
* Copyright (c) 2020, 2023 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,13 +9,15 @@
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.lic.internal.jface.i18n;

import org.eclipse.osgi.util.NLS;

public class ImportLicenseDialogMessages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.passage.lic.internal.jface.i18n.ImportLicenseDialogMessages"; //$NON-NLS-1$
public static String ImportLicenseDialog_browse;
public static String ImportLicenseDialog_browse_dialog_title;
public static String ImportLicenseDialog_column_evaluation;
public static String ImportLicenseDialog_column_feature;
Expand Down
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2020, 2022 ArSysOp and others
# Copyright (c) 2020, 2023 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,7 +9,9 @@
#
# Contributors:
# ArSysOp - initial API and implementation
# ArSysOp - further support
###############################################################################
ImportLicenseDialog_browse=B&rowse...
ImportLicenseDialog_browse_dialog_title=Import all licenses from folder
ImportLicenseDialog_column_evaluation=Evaluation
ImportLicenseDialog_column_feature=Feature
Expand Down
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2021, 2022 ArSysOp
# Copyright (c) 2021, 2023 ArSysOp
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,7 +9,9 @@
#
# Contributors:
# ArSysOp - initial API and implementation, further support
# ArSysOp - further support
###############################################################################
ImportLicenseDialog_browse=\u041E\u0431\u0437\u043E\u0440...
ImportLicenseDialog_browse_dialog_title=\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437 \u0444\u0430\u0439\u043B\u0430
ImportLicenseDialog_column_evaluation=\u0423\u0441\u043B\u043E\u0432\u0438\u0435
ImportLicenseDialog_column_feature=\u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u044C
Expand All @@ -18,6 +20,6 @@ ImportLicenseDialog_import_title=&\u0418\u043C\u043F\u043E\u0440\u0442
ImportLicenseDialog_import_tooltip=\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438
ImportLicenseDialog_io_error=\u0418\u043C\u043F\u043E\u0440\u0442 \u0444\u0430\u0439\u043B\u0430 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u0432\u0432\u043E\u0434\u0430-\u0432\u044B\u0432\u043E\u0434\u0430: %s
ImportLicenseDialog_lic_read_failed=\u0424\u0430\u0439\u043B \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438 \u043D\u0435\u0447\u0438\u0442\u0430\u0435\u043C
ImportLicenseDialog_path_label=\u0418\u0437 \u043F\u0430\u043F\u043A\u0438 \u0441 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438\u044F\u043C\u0438:
ImportLicenseDialog_path_label=\u0418\u0437 \u043F\u0430\u043F\u043A\u0438 \u0441 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u044F\u043C\u0438:
ImportLicenseDialog_prelude=\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438
ImportLicenseDialog_title=\u0418\u043C\u043F\u043E\u0440\u0442 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2021, 2022 ArSysOp
# Copyright (c) 2021, 2023 ArSysOp
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,6 +9,7 @@
#
# Contributors:
# ArSysOp - initial API and implementation, further support
# ArSysOp - further support
###############################################################################
LicenseStatusDialog_column_id=\u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u044C
LicenseStatusDialog_column_status=\u0421\u0442\u0430\u0442\u0443\u0441
Expand All @@ -19,7 +20,7 @@ LicenseStatusDialog_intention_import_tooltip=\u0418\u043C\u043F\u043E\u0440\u044
LicenseStatusDialog_intention_request=&\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C...
LicenseStatusDialog_intention_request_tooltip=\u041E\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u043E\u043D\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445
LicenseStatusDialog_intention_accept=&\u041F\u0440\u0438\u043D\u044F\u0442\u044C...
LicenseStatusDialog_intention_accept_tooltip=\u041D\u0435 \u0432\u0441\u0435 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u043E\u043D\u043D\u044B\u0435 \u0441\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438 \u043F\u0440\u0438\u043D\u044F\u0442\u044B
LicenseStatusDialog_intention_accept_tooltip=\u041D\u0435 \u0432\u0441\u0435 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u043E\u043D\u043D\u044B\u0435 \u0441\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u044B
LicenseStatusDialog_intention_diagnose=&\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430
LicenseStatusDialog_intention_diagnose_tooltip=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F
LicenseStatusDialog_title=\u041B\u0438\u0446\u0435\u043D\u0437\u0438\u043E\u043D\u043D\u044B\u0439 \u0441\u0442\u0430\u0442\u0443\u0441
Expand Down
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021 ArSysOp
* Copyright (c) 2021, 2023 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -41,9 +41,13 @@

@SuppressWarnings("restriction")
/**
* TODO: (1) validity: Workspace.Agreements must report existence for content
* file denoted by [file] attribute (2) rename: there should be a way to rename
* <pre>
* TODO:
* (1) validity: Workspace.Agreements must report existence for content
* file denoted by [file] attribute
* (2) rename: there should be a way to rename
* content file
* </pre>
*/
public final class AgreementFileRenderer extends TextWithButtonRenderer {

Expand Down Expand Up @@ -85,8 +89,6 @@ protected void locateAgreementContentFile() {
}

private String reside(File file) throws Exception {
// rename in already defined name if any:
// String name = definedName().orElse(file.getName());
String name = file.getName();
new AgreementsService().get().located(name).write(Files.readAllBytes(file.toPath()));
return name;
Expand Down

0 comments on commit c40d964

Please sign in to comment.