Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / java / org / txm / groovy / core / CreateMissingPropertiesFiles.groovy @ 1094

History | View | Annotate | Download (529 Bytes)

1 973 mdecorde
package org.txm.groovy.core
2 973 mdecorde
3 973 mdecorde
File workspace = new File("/home/mdecorde/workspace047")
4 973 mdecorde
def langs = ["fr", "ru"]
5 973 mdecorde
for (File project : workspace.listFiles()) {
6 973 mdecorde
        if (!project.isDirectory()) continue;
7 973 mdecorde
8 973 mdecorde
        File osgiinf = new File(project, "OSGI-INF/l10n")
9 973 mdecorde
        if (!osgiinf.exists()) continue;
10 973 mdecorde
11 973 mdecorde
        println project.getName()
12 973 mdecorde
        File defaultFile = new File(osgiinf, "bundle.properties")
13 973 mdecorde
14 973 mdecorde
        for (def lang : langs) {
15 973 mdecorde
                File langFile = new File(osgiinf, "bundle_"+lang+".properties");
16 973 mdecorde
                if (!langFile.exists()) {
17 973 mdecorde
                        langFile.createNewFile()
18 973 mdecorde
                }
19 973 mdecorde
        }
20 973 mdecorde
}