sky110120 / multiproperties

Automatically exported from code.google.com/p/multiproperties
0 stars 0 forks source link

Import properties files #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be good to import existing propeties as columns. I've plugin with two 
file "plugin_de.properties" (German) and "plugin.properties" (English) language 
with some strings. It would be nice to create new column with multiproperties 
editor and import the contents from this file to culumn, than do the same with 
next column. May be the Handler file name can also be stored if import was used.

Original issue reported on code.google.com by andre.bo...@gmail.com on 21 Dec 2011 at 1:52

GoogleCodeExporter commented 9 years ago
If possible also import should handle empty lines and comments.

Original comment by andre.bo...@gmail.com on 21 Dec 2011 at 2:43

GoogleCodeExporter commented 9 years ago
... and may be the header, but difficult to decide where the header stops - 
multiline comments from top of the file until first empty line?

...
 # Copyright (c) 2007 - 2009 by Michael Mimo Moratti
 # Copyright (c) 2010 - 2011 by Andre Bossert
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 #
 # http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions
 # and limitations under the License.

 # LogViewer:
 # English strings

# see plugin.properties
logviewer.action.openwith.name=Open with Log Viewer
logviewer.plugin.console.name=Log Viewer Console

# messages
error.fatal.title=Log Viewer Error
error.info.title=Log Viewer Information
error.warning.title=Log Viewer Warning
...

Original comment by andre.bo...@gmail.com on 21 Dec 2011 at 2:46

GoogleCodeExporter commented 9 years ago
Absolutely good idea. I also had the same idea in my mind in the following way. 
The user will be able to create new MultiProperties based on existing 
properties files. This way the the empty and comment lines will be also 
processed. So it can result the MultiProperties structure. The function can be 
activated from File / New / ... menu point.

Then an existing MultiProperties column could be initialized (filled) from an 
existing properties file. In this case only the property records could be 
imported. The previously unknown property keys will be created in the end of 
MultiProperties file.

Original comment by ska...@gmail.com on 12 Jan 2012 at 4:42

GoogleCodeExporter commented 9 years ago

Original comment by ska...@gmail.com on 12 Jan 2012 at 4:43

GoogleCodeExporter commented 9 years ago
It is a common case, that not all team members are using the same editor. This 
way it is a common issue: the properties files are newer, having new keys not 
yet present in the multiproperties file.
Please have in your mind the feature of re-synchronizating the existing 
multiproperties file and the *.properties files - or whatever resources 
produced by the handlers - while implementing the import.
Re-synchronization and import could be a common handler function.

Original comment by zvad...@gmail.com on 19 Jul 2012 at 11:03

GoogleCodeExporter commented 9 years ago
The import feature is implemented. Next release will contain it, most probably 
in the following days.
While it is not documented in the wiki (will be done as well), until try the 
new "import" button the second "Column" page.

Original comment by ska...@gmail.com on 13 Sep 2012 at 8:16

GoogleCodeExporter commented 9 years ago
Issue 15 has been merged into this issue.

Original comment by ska...@gmail.com on 13 Sep 2012 at 8:17