}
try {
trans = new StringIdBundle(getLang());
- System.out.println("UPDATING");
trans.updateFile(configDir);
- System.out.println("UPDATED");
} catch (IOException e) {
syserr(e);
}
* in case of I/O error
*/
private Story save(Story story, String luid) throws IOException {
+ // Do not change the original metadata, but change the original story
MetaData key = story.getMeta().clone();
+ story.setMeta(key);
if (luid == null || luid.isEmpty()) {
getStories(); // refresh lastId if needed
writer.write(title);
writer.write("\n");
if (author != null && !author.isEmpty()) {
- writer.write("©" + author);
+ writer.write(Instance.getTrans().getString(StringId.BY) + " "
+ + author);
}
if (date != null && !date.isEmpty()) {
writer.write(" (");
MetaData meta = InfoReader.readMeta(new File(new File(source
.toURI()).getPath() + ".info"));
- // Some old .info files don't have this information...
+ // Some old .info files don't have those now required fields...
String test = meta.getTitle() == null ? "" : meta.getTitle();
test += meta.getAuthor() == null ? "" : meta.getAuthor();
test += meta.getDate() == null ? "" : meta.getDate();
+ test += meta.getUrl() == null ? "" : meta.getUrl();
if (test.isEmpty()) {
MetaData superMeta = super.getMeta(source, reset(in));
if (meta.getTitle() == null || meta.getTitle().isEmpty()) {
if (meta.getDate() == null || meta.getDate().isEmpty()) {
meta.setDate(superMeta.getDate());
}
+ if (meta.getUrl() == null || meta.getUrl().isEmpty()) {
+ meta.setUrl(superMeta.getUrl());
+ }
}
return meta;