Skip to content

Commit

Permalink
Fixed issue #951.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Mar 10, 2023
1 parent e1a538c commit ab1413b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
15 changes: 13 additions & 2 deletions src/org/nschmidt/ldparteditor/data/GData1.java
Expand Up @@ -1762,7 +1762,7 @@ public String inlinedString(BFC bfc, GColour colour) {
Object[] messageArguments = {getNiceString()};
MessageFormat formatter = new MessageFormat(""); //$NON-NLS-1$
formatter.setLocale(MyLanguage.getLocale());
formatter.applyPattern(I18n.DATFILE_INLINED);
formatter.applyPattern(I18n.DATFILE_INLINE_START);

sb.append(formatter.format(messageArguments) + "<br>"); //$NON-NLS-1$
}
Expand Down Expand Up @@ -2203,8 +2203,19 @@ public String inlinedString(BFC bfc, GColour colour) {
break;
}
}
if (Inliner.withSubfileReference)
if (Inliner.withSubfileReference) {
sb.append("0 !LPE INLINE_END<br>"); //$NON-NLS-1$
} else {
if (!(Inliner.recursively && !this.equals(this.firstRef)) && !Inliner.noComment) {

Object[] messageArguments = {shortName};
MessageFormat formatter = new MessageFormat(""); //$NON-NLS-1$
formatter.setLocale(MyLanguage.getLocale());
formatter.applyPattern(I18n.DATFILE_INLINE_END);

sb.append(formatter.format(messageArguments) + "<br>"); //$NON-NLS-1$
}
}
if (lastBFC == BFC.NOCLIP) {
sb.append(new GDataBFC(BFC.CLIP, this).toString() + "<br>"); //$NON-NLS-1$
}
Expand Down
5 changes: 4 additions & 1 deletion src/org/nschmidt/ldparteditor/data/GDataCSG.java
Expand Up @@ -676,7 +676,7 @@ public void run(final IProgressMonitor monitor) throws InvocationTargetException
Object[] messageArguments = {getNiceString()};
MessageFormat formatter = new MessageFormat(""); //$NON-NLS-1$
formatter.setLocale(MyLanguage.getLocale());
formatter.applyPattern(I18n.DATFILE_INLINED);
formatter.applyPattern(I18n.DATFILE_INLINE_START);

sb.append(formatter.format(messageArguments) + "<br>"); //$NON-NLS-1$

Expand Down Expand Up @@ -716,6 +716,9 @@ public void run(final IProgressMonitor monitor) throws InvocationTargetException
lineBuilder3.append(floatToString(g3V3.z / 1000f));
sb.append(lineBuilder3.toString() + "<br>"); //$NON-NLS-1$
}

formatter.applyPattern(I18n.DATFILE_INLINE_END);
sb.append(formatter.format(messageArguments) + "<br>"); //$NON-NLS-1$
}
});
} catch (InvocationTargetException consumed) {
Expand Down
5 changes: 3 additions & 2 deletions src/org/nschmidt/ldparteditor/i18n/DatFile.properties
@@ -1,8 +1,9 @@
CSG_TO_COMPILE = Please display the file on the 3D editor to enable CSG optimization.\n"Quick Fix" will display the file on the 3D editor.
FOUND_T_JUNCTION = 0 !LPE TODO Found a T-junction! Please increase !LPE CSG_EPSILON_T_JUNCTION
HEADER_HINT = Header Hint
INLINE_PREFIX = 0 // Inlined:
INLINED = 0 // Inlined: {0}
INLINE_END = 0 // Inlined end: {0}
INLINE_PREFIX = 0 // Inlined
INLINE_START = 0 // Inlined: {0}
INVALID_UPDATE = There is an invalid UPDATE information in the part type
LINE = line {0} [{1}]
MISSING_AUTHOR = The author name is missing\nValid examples\n "0 Author: John Doe"\n "0 Author: Jane Doe [jjdoe]"
Expand Down
3 changes: 2 additions & 1 deletion src/org/nschmidt/ldparteditor/i18n/I18n.java
Expand Up @@ -266,8 +266,9 @@ private static void adjust() { // Calculate line offset
public static final String DATFILE_CSG_TO_COMPILE = DATFILE.getString(getProperty());
public static final String DATFILE_FOUND_T_JUNCTION = DATFILE.getString(getProperty());
public static final String DATFILE_HEADER_HINT = DATFILE.getString(getProperty());
public static final String DATFILE_INLINED = DATFILE.getString(getProperty());
public static final String DATFILE_INLINE_END = DATFILE.getString(getProperty());
public static final String DATFILE_INLINE_PREFIX = DATFILE.getString(getProperty());
public static final String DATFILE_INLINE_START = DATFILE.getString(getProperty());
public static final String DATFILE_INVALID_UPDATE = DATFILE.getString(getProperty());
public static final String DATFILE_LINE = DATFILE.getString(getProperty());
public static final String DATFILE_MISSING_AUTHOR = DATFILE.getString(getProperty());
Expand Down

0 comments on commit ab1413b

Please sign in to comment.