Skip to content

Commit

Permalink
[#695] Improve localization for org.eclipse.tools.templates.ui bundle
Browse files Browse the repository at this point in the history
* retarget localization to default location
* do i18n for plugin.xml
* do i18n for java sources
* add missed copyright headers
  • Loading branch information
ruspl-afed committed Feb 7, 2024
1 parent 7f69191 commit 1589b8b
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Automatic-Module-Name: org.eclipse.tools.templates.ui
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.tools.templates.ui;singleton:=true
Bundle-Version: 2.0.100.qualifier
Bundle-Activator: org.eclipse.tools.templates.ui.internal.Activator
Expand All @@ -14,5 +14,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.tools.templates.ui,
org.eclipse.tools.templates.ui.internal;x-internal:=true
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###############################################################################
# Copyright (c) 2024 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Alexander Fedorov (ArSysOp) - initial API and implementation
###############################################################################

Bundle-Name = Template Engine UI
Bundle-Vendor = Eclipse CDT
extension-point.templates.name = New Element Templates
22 changes: 17 additions & 5 deletions tools.templates/org.eclipse.tools.templates.ui/build.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
###############################################################################
# Copyright (c) 2016, 2024 Contributors to Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# See git history
###############################################################################
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
about.html,\
plugin.xml,\
bin.includes = .,\
META-INF/,\
OSGI-INF/,\
schema/,\
plugin.properties
about.html,\
plugin.xml
src.includes = about.html
13 changes: 0 additions & 13 deletions tools.templates/org.eclipse.tools.templates.ui/plugin.properties

This file was deleted.

16 changes: 15 additions & 1 deletion tools.templates/org.eclipse.tools.templates.ui/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
Copyright (c) 2016, 2024 Contributors to the Eclipse Foundation
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
See git history
-->
<plugin>
<extension-point id="templates" name="New Element Templates" schema="schema/templates.exsd"/>

<extension-point id="templates" name="%extension-point.templates.name" schema="schema/templates.exsd"/>

</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2024 ArSysOp and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Fedorov (ArSysOp) - initial API and implementation
*******************************************************************************/
package org.eclipse.tools.templates.ui.internal;

import org.eclipse.osgi.util.NLS;

public class Messages extends NLS {
private static final String BUNDLE_NAME = Messages.class.getPackageName() + ".messages"; //$NON-NLS-1$
public static String TemplateExtension_tag_all;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}

private Messages() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private void init() {
"templates"); //$NON-NLS-1$

// tags
Tag allTag = new Tag(Tag.ALL_ID, "All");
Tag allTag = new Tag(Tag.ALL_ID, Messages.TemplateExtension_tag_all);
tags.put(allTag.getId(), allTag);

for (IConfigurationElement element : point.getConfigurationElements()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
###############################################################################
# Copyright (c) 2024 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Alexander Fedorov (ArSysOp) - initial API and implementation
###############################################################################

TemplateExtension_tag_all=All
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
###############################################################################
# Copyright (c) 2021, 2024 Contributors to Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# See git history
###############################################################################
ProjectImportConfigurator_Checking=Checking: {0}
TemplateWizard_CannotBeCreated=Project cannot be created
TemplateWizard_ErrorCreating=Error Creating Project
Expand Down

0 comments on commit 1589b8b

Please sign in to comment.