[#695] Improve localization for org.eclipse.tools.templates.ui bundle

* retarget localization to default location
* do i18n for plugin.xml
* do i18n for java sources
* add missed copyright headers
This commit is contained in:
Alexander Fedorov 2024-02-07 20:44:39 +03:00
parent 7f69191296
commit 1589b8b074
9 changed files with 105 additions and 23 deletions

View file

@ -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
@ -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

View file

@ -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

View file

@ -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

View file

@ -1,13 +0,0 @@
#################################################################################
# Copyright (c) 2017 QNX Software Systems 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
#################################################################################
pluginName=Template Engine UI
providerName=Eclipse CDT

View file

@ -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>

View file

@ -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() {
}
}

View file

@ -38,7 +38,7 @@ public class TemplateExtension {
"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()) {

View file

@ -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

View file

@ -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