Skip to content

Commit

Permalink
Merge branch 'devel' into dbeaver#35128-arabic-localization
Browse files Browse the repository at this point in the history
  • Loading branch information
KawtharAlakri authored Aug 21, 2024
2 parents d719426 + a583be9 commit c160623
Show file tree
Hide file tree
Showing 31 changed files with 211 additions and 163 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ keyword.org.jkiss.dbeaver.core.keyword.pref.editor.binary.label = binary hex blo
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.data.label = data edit fetch size limit references scroll segment filters order sql resultset refresh results timeout query subselect cursors key columns navigator errors
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.content.label = lob blob clob object binary commit long encoding utf-8 formatter hex base64 dialog memory separate editor cache content
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.erd.label = erd diagram colorize print margin grid visibility partitions views
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.sql.label = sql script commit separate connection query word occurrence save tab folding results occurrences restore
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.entity.label = object entity editor column sql preview refresh disconnect close
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.sql.label = sql script commit separate connection query word occurrence save tab folding results occurrences restore quotes brackets
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.entity.label = reopen open object entity editor column sql preview refresh disconnect close
keyword.org.jkiss.dbeaver.core.keyword.pref.ui.general.label = update http proxy driver
keyword.org.jkiss.dbeaver.core.keyword.pref.ui.notifications.label = notification sound popup
keyword.org.jkiss.dbeaver.core.keyword.connection = database connection connect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ keyword.org.jkiss.dbeaver.core.keyword.pref.editor.binary.label = binary hex bl
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.data.label = data edit fetch size limit references scroll segment filters order sql resultset refresh results timeout query subselect cursors key columns navigator errors
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.content.label = lob blob clob object binary commit long encoding utf-8 formatter hex base64 dialog memory separate editor cache content
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.erd.label = Entity-Relationship-Modell Farben Drucken Abst\u00E4nde grid visibility partitions views
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.sql.label = sql script commit separate connection query word occurrence save tab folding results occurrences restore
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.entity.label = object entity editor column sql preview refresh
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.sql.label = sql script commit separate connection query word occurrence save tab folding results occurrences restore quotes brackets
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.entity.label = reopen open object entity editor column sql preview refresh
keyword.org.jkiss.dbeaver.core.keyword.pref.ui.general.label = Aktualisierungen http Proxy Treiber
keyword.org.jkiss.dbeaver.core.keyword.connection = Datenbank Verbindungen verbinden
keyword.org.jkiss.dbeaver.core.keyword.database.connection.label = Treiber Sicherheit Fehler Timeout Transaktionen Maven Oracle postgresql Ausf\u00FChrung meta Metadaten commit auto-commit Benachrichtigungen Passwort bouncycastle http Verschl\u00FCsselung
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ keyword.org.jkiss.dbeaver.core.keyword.pref.editor.binary.label = binary hex blo
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.data.label = fetch limit references scroll sql resultset timeout query subselect cursors key errors \u0437\u0430\u043F\u0440\u043E\u0441 \u0432\u044B\u0431\u043E\u0440\u043A\u0430 \u0441\u0435\u0433\u043C\u0435\u043D\u0442 \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u043C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u043A\u043B\u044E\u0447 \u043F\u043E\u0434\u0437\u0430\u043F\u0440\u043E\u0441 \u043A\u0443\u0440\u0441\u043E\u0440 \u0443\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u0432\u043D\u0435\u0448\u043D\u0438\u0439 \u043D\u0430\u0432\u0438\u0433\u0430\u0442\u043E\u0440 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u0442\u0430\u0439\u043C\u0430\u0443\u0442
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.content.label = lob blob clob binary commit long encoding hex base64 \u0434\u0432\u043E\u0438\u0447\u043D\u044B\u0435 \u043F\u0430\u043C\u044F\u0442\u044C \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0430 \u043A\u044D\u0448\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u043C\u0438\u0442
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.erd.label = erd diagram grid partitions views \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u044B \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043A\u043B\u044E\u0447 \u043F\u0435\u0440\u0432\u0438\u0447\u043D\u044B\u0439 \u043E\u0442\u0441\u0442\u0443\u043F \u044F\u0447\u0435\u0439\u043A\u0438 \u0441\u0435\u0442\u043A\u0430 \u043F\u0435\u0447\u0430\u0442\u044C
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.sql.label = sql script commit connection query occurrence save occurrences \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u043E\u0448\u0438\u0431\u043A\u0430 \u0431\u043B\u043E\u043A\u0438 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.entity.label = entity editor sql \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B \u043F\u0430\u043D\u0435\u043B\u044C \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A \u0441\u0435\u0442\u043A\u0430 \u0441\u043F\u0438\u0441\u043A\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.sql.label = sql script commit connection query occurrence save occurrences quotes brackets \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u043E\u0448\u0438\u0431\u043A\u0430 \u0431\u043B\u043E\u043A\u0438 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435
keyword.org.jkiss.dbeaver.core.keyword.pref.editor.entity.label = reopen open entity editor sql \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B \u043F\u0430\u043D\u0435\u043B\u044C \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A \u0441\u0435\u0442\u043A\u0430 \u0441\u043F\u0438\u0441\u043A\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435
keyword.org.jkiss.dbeaver.core.keyword.pref.ui.general.label = update http proxy driver \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043F\u0440\u043E\u043A\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440
keyword.org.jkiss.dbeaver.core.keyword.database.connection.label = drivers errors timeout transaction maven oracle postgresql execution commit password bouncycastle http encription \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F
keyword.org.jkiss.dbeaver.core.keyword.pref.resultset.grid.label = grid icon double-click batch \u0442\u0430\u0431\u043B\u0438\u0446\u0430 \u0444\u0438\u043B\u044C\u0442\u0440\u044B \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0430 \u0446\u0432\u0435\u0442
Expand All @@ -112,4 +112,4 @@ confirm.exit.title=\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u043F\u0440\u043
confirm.exit.message=\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?

confirm.driver_download.title=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0411\u0414
confirm.driver_download.message=\u0424\u0430\u0439\u043B\u044B \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442 \u0434\u043B\u044F \u0411\u0414 "{0}".\n\u0425\u043E\u0442\u0438\u0442\u0435 \u043B\u0438 \u0412\u044B \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438?
confirm.driver_download.message=\u0424\u0430\u0439\u043B\u044B \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442 \u0434\u043B\u044F \u0411\u0414 "{0}".\n\u0425\u043E\u0442\u0438\u0442\u0435 \u043B\u0438 \u0412\u044B \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438?
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public void openResource(@NotNull IResource resource) throws CoreException, DBEx
if (resource instanceof DBFFileStoreProvider) {
IFileStore fileStore = ((DBFFileStoreProvider) resource).getFileStore();
long length = fileStore.fetchInfo().getLength();
if (!UIUtils.confirmAction(null, "Open resource '" + resource.getFullPath() +
"'?\nSize = " + ByteNumberFormat.getInstance().format(length))) {
if (!UIUtils.confirmAction(resource.getFullPath().toString(), "Open remote resource '" + resource.getFullPath() +
"'?\nSize = " + ByteNumberFormat.getInstance().format(length) + " bytes")) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,22 @@ public static List<GeomAttrs> extractGeometryAttributes(IResultSetController con
return result;
}

public static void setGeometryProperties(@NotNull IResultSetController controller, @NotNull GeomAttrs geomAttrs, @NotNull DBGeometry geometry, @NotNull RGB geometryColor, @NotNull ResultSetRow row) {
/**
* Set geometry properties for the given geometry.
*
* @param controller result set controller to get the model.
* @param geomAttrs geometry attributes.
* @param geometry geometry to set properties.
* @param index index of the geometry in the result set.
* @param row row of the result set.
*/
public static void setGeometryProperties(
@NotNull IResultSetController controller,
@NotNull GeomAttrs geomAttrs,
@NotNull DBGeometry geometry,
int index,
@NotNull ResultSetRow row
) {
final ResultSetModel model = controller.getModel();
final Map<String, String> info = new LinkedHashMap<>();
for (DBDAttributeBinding binding : geomAttrs.descAttrs) {
Expand All @@ -97,7 +112,7 @@ public static void setGeometryProperties(@NotNull IResultSetController controlle
}
final Map<String, Object> properties = new LinkedHashMap<>();
properties.put("id", DBUtils.getObjectFullName(geomAttrs.geomAttr, DBPEvaluationContext.UI));
properties.put("color", String.format("#%02x%02x%02x", geometryColor.red, geometryColor.green, geometryColor.blue));
properties.put("color", info.getOrDefault("color", rgbToHex(makeGeometryColor(index))));
properties.put("info", info);
geometry.setProperties(properties);

Expand All @@ -124,14 +139,19 @@ public static void setGeometryProperties(@NotNull IResultSetController controlle
}

@NotNull
public static RGB makeGeometryColor(int index) {
private static RGB makeGeometryColor(int index) {
if (index == 0) {
return Display.getCurrent().getSystemColor(SWT.COLOR_BLUE).getRGB();
} else {
return UIColors.getColor(index).getRGB();
}
}

@NotNull
private static String rgbToHex(RGB rgb) {
return String.format("#%02x%02x%02x", rgb.red, rgb.green, rgb.blue);
}

public static int getDefaultSRID() {
int srid = GISViewerActivator.getDefault().getPreferences().getInt(GeometryViewerConstants.PREF_DEFAULT_SRID);
if (srid == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void primeEditorValue(@Nullable Object value) throws DBException
for (int i = 0; i < geomAttrs.size(); i++) {
final GeometryDataUtils.GeomAttrs ga = geomAttrs.get(i);
if (ga.geomAttr.matches(attr, false)) {
GeometryDataUtils.setGeometryProperties(resultSetController, ga, geometry, GeometryDataUtils.makeGeometryColor(i), row);
GeometryDataUtils.setGeometryProperties(resultSetController, ga, geometry, i, row);
break;
}
}
Expand Down Expand Up @@ -189,4 +189,4 @@ public Object extractEditorValue() throws DBCException {
return leafletViewer.getCurrentValue();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void refreshData(boolean refreshMetadata, boolean append, boolean keepSta

if (geometry != null && !(geometry.getSRID() != 0 && geometry.isEmpty())) {
geometries.add(geometry);
GeometryDataUtils.setGeometryProperties(getController(), geomAttrs, geometry, GeometryDataUtils.makeGeometryColor(i), row);
GeometryDataUtils.setGeometryProperties(getController(), geomAttrs, geometry, i, row);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public void widgetSelected(SelectionEvent e) {
UIUtils.createControlLabel(generalSettings, DTMessages.data_transfer_wizard_output_label_file_name_pattern);
fileNameText = new Text(generalSettings, SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 200;
gd.horizontalSpan = 4;
fileNameText.setLayoutData(gd);
fileNameText.addModifyListener(e -> {
Expand Down Expand Up @@ -345,7 +346,7 @@ public void expansionStateChanged(ExpansionEvent e) {
}

{
Group resultsSettings = UIUtils.createControlGroup(composite, DTUIMessages.stream_consumer_page_output_label_results, 1, GridData.FILL_HORIZONTAL, 0);
Group resultsSettings = UIUtils.createControlGroup(composite, DTUIMessages.stream_consumer_page_output_label_results, 2, GridData.FILL_HORIZONTAL, 0);

showFinalMessageCheckbox = UIUtils.createCheckbox(resultsSettings, DTUIMessages.stream_consumer_page_output_label_show_finish_message, getWizard().getSettings().isShowFinalMessage());
showFinalMessageCheckbox.addSelectionListener(new SelectionAdapter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.DBIcon;
Expand Down Expand Up @@ -96,7 +99,20 @@ public void createControl(Composite parent) {
Composite composite = UIUtils.createComposite(parent, 1);

{
Composite generalSettings = UIUtils.createControlGroup(composite, DTMessages.data_transfer_wizard_settings_group_general, 5, GridData.HORIZONTAL_ALIGN_BEGINNING, 0);
final ExpandableComposite generalExpander = new ExpandableComposite(composite, SWT.NONE);
generalExpander.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
generalExpander.setText(DTMessages.data_transfer_wizard_settings_group_general);
generalExpander.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
UIUtils.resizeShell(parent.getShell());
}
});

Composite generalSettings = UIUtils.createControlGroup(generalExpander, DTMessages.data_transfer_wizard_settings_group_general, 5, GridData.HORIZONTAL_ALIGN_BEGINNING, -1);
//generalSettings.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));

generalExpander.setClient(generalSettings);
{
formatProfilesCombo = UIUtils.createLabelCombo(generalSettings, DTMessages.data_transfer_wizard_settings_label_formatting, SWT.DROP_DOWN | SWT.READ_ONLY);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ public void createControl(Composite parent) {
Group sourceSettingsGroup = UIUtils.createControlGroup(settingsGroup, DTUIMessages.data_transfer_wizard_final_group_settings_source, 1, GridData.FILL_BOTH, 0);
sourceSettingsText = new Text(sourceSettingsGroup, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL);
sourceSettingsText.setLayoutData(new GridData(GridData.FILL_BOTH));
((GridData) sourceSettingsText.getLayoutData()).widthHint = 150;
((GridData) sourceSettingsText.getLayoutData()).heightHint = 30;

Group targetSettingsGroup = UIUtils.createControlGroup(settingsGroup, DTUIMessages.data_transfer_wizard_final_group_settings_target, 1, GridData.FILL_BOTH, 0);
targetSettingsText = new Text(targetSettingsGroup, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL);
targetSettingsText.setLayoutData(new GridData(GridData.FILL_BOTH));
((GridData) targetSettingsText.getLayoutData()).widthHint = 150;
((GridData) targetSettingsText.getLayoutData()).heightHint = 30;
}

Expand Down
Loading

0 comments on commit c160623

Please sign in to comment.