-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I18n v2.2 (Scope: strategy.engine.framework.startup.ui) (#12841)
* i18n_v2 #1 annotate I18n classes with @NonNls * i18n_v2 #2 annotate @NonNls with .-pattern (.*String .+ *= "\w+\.[A-Za-z]+[A-Za-z\.]*) * i18n_v2 #3 fix via @NonNls imports * i18n_v2 #4 add @NonNls to Strings based on review with pattern (.*String .* = .*\+.*") * i18n_v2 #5 add @NonNls import to AbstractConditionsAttachment.java AbstractImageFactory.java AutoPlacementFinder.java ClipPlayer.java CliProperties.java CommentPanel.java DownloadFile.java FileNameUtils.java FlagIconImageFactory.java GameParser.java GameRunner.java InGameLobbyWatcher.java MapData.java NodeBbForumPoster.java NotificationMessages.java ObjectiveProperties.java PoliticsText.java ProductionRepairPanel.java ProductionTabsProperties.java TooltipProperties.java UnitIconProperties.java UnitImageFactory.java * i18n_v2.1 #6 add @NonNls to Strings based on review with static-String-pattern (.*static final String .* = ") * i18n_v2.1 #7 add @NonNls and Locals to getUpperCase() calls (toUpperCase\()\) * i18n_v2.1 #7 add @NonNls and Locals to toLowerCase() or toUpperCase() calls (?<!NonNls) (p.* static final String) * i18n_v2.1 #8 fix checkstyle error and spotlessJavaApply * LanchesterDebugAction System.out -> log.info * i18n v2.2 Scope: strategy.engine.framework.startup.ui 1. Invoke the Code | Analyse Code | Run Inspection by Name... action. 2. Select the Hardcoded strings inspection. New class HtmlBuilder.java to introduce simple builder pattern for HTML
- Loading branch information
Showing
20 changed files
with
395 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
game-app/game-core/src/main/java/games/strategy/engine/framework/HtmlBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package games.strategy.engine.framework; | ||
|
||
import org.jetbrains.annotations.Nls; | ||
|
||
public class HtmlBuilder { | ||
final StringBuilder s = new StringBuilder(); | ||
|
||
public HtmlBuilder() { | ||
s.append("<html>"); | ||
} | ||
|
||
public HtmlBuilder addText(@Nls String text) { | ||
s.append(text); | ||
return this; | ||
} | ||
|
||
public HtmlBuilder lineBreak() { | ||
s.append("</br>"); | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return s.toString() + "</html>"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.