i18n: fix files
[nikiroo-utils.git] / src / be / nikiroo / fanfix / output / BasicOutput.java
index 97920cbecb9c4cbf57d2f0802729299fa5c11cef..f3e314171321d17e63cb98b12574181fc058fd1a 100644 (file)
@@ -65,10 +65,10 @@ public abstract class BasicOutput {
                        String desc = Instance.getTrans().getStringX(id, this.name());
 
                        if (desc == null) {
-                               desc = Instance.getTrans().getString(id, this);
+                               desc = Instance.getTrans().getString(id, this.toString());
                        }
 
-                       if (desc == null) {
+                       if (desc == null || desc.isEmpty()) {
                                desc = this.toString();
                        }
 
@@ -79,9 +79,10 @@ public abstract class BasicOutput {
                 * The default extension to add to the output files.
                 * 
                 * @param readerTarget
-                *            the target to point to to read the {@link Story} (for
-                *            instance, the main entry point if this {@link Story} is in
-                *            a directory bundle)
+                *            TRUE to point to the main {@link Story} entry point for a
+                *            reader (for instance, the main entry point if this
+                *            {@link Story} is in a directory bundle), FALSE to point to
+                *            the main file even if it is a directory for instance
                 * 
                 * @return the extension
                 */
@@ -284,9 +285,10 @@ public abstract class BasicOutput {
         * The default extension to add to the output files.
         * 
         * @param readerTarget
-        *            the target to point to to read the {@link Story} (for
-        *            instance, the main entry point if this {@link Story} is in a
-        *            directory bundle)
+        *            TRUE to point to the main {@link Story} entry point for a
+        *            reader (for instance, the main entry point if this
+        *            {@link Story} is in a directory bundle), FALSE to point to the
+        *            main file even if it is a directory for instance
         * 
         * @return the extension
         */
@@ -328,16 +330,16 @@ public abstract class BasicOutput {
 
                String chapterNameNum = String.format("%03d", 0);
                String paragraphNumber = String.format("%04d", 0);
-               imageName = paragraphNumber + "_" + chapterNameNum + ".png";
+               imageName = paragraphNumber + "_" + chapterNameNum;
 
                if (story.getMeta() != null) {
                        story.getMeta().setType("" + getType());
                }
 
-               if (writeCover) {
+               if (isWriteCover()) {
                        InfoCover.writeCover(targetDir, targetName, story.getMeta());
                }
-               if (writeInfo) {
+               if (isWriteInfo()) {
                        InfoCover.writeInfo(targetDir, targetName, story.getMeta());
                }
 
@@ -376,13 +378,13 @@ public abstract class BasicOutput {
 
                int num = 0;
                String paragraphNumber = String.format("%04d", num++);
-               imageName = chapterNameNum + "_" + paragraphNumber + ".png";
+               imageName = chapterNameNum + "_" + paragraphNumber;
 
                writeChapterHeader(chap);
                int i = 1;
                for (Paragraph para : chap) {
                        paragraphNumber = String.format("%04d", num++);
-                       imageName = chapterNameNum + "_" + paragraphNumber + ".png";
+                       imageName = chapterNameNum + "_" + paragraphNumber;
                        writeParagraph(para);
                        if (chapPg != null) {
                                chapPg.setProgress(i++);