From 823bfa0c8e5649503bbd0c55f019215078e4bd2c Mon Sep 17 00:00:00 2001 From: wsbrenk Date: Wed, 6 Sep 2023 20:21:09 +0200 Subject: [PATCH] https://github.com/ho-dev/HattrickOrganizer (#1911) --- docs/README.md | 12 +-- docs/contributing.md | 6 +- docs/installing_ho.rst | 2 +- docs/release_notes(stable).md | 2 +- src/main/java/core/gui/Credits.java | 5 +- src/main/java/core/gui/HOMainFrame.java | 4 +- src/main/java/core/net/MyConnector.java | 16 ++-- .../core/training/WeeklyTrainingType.java | 2 +- src/main/java/core/util/Updater.java | 6 +- .../module/pluginFeedback/FeedbackPanel.java | 26 +++--- .../transfer/scout/MiniScoutDialog.java | 11 ++- .../transfer/scout/TransferEingabePanel.java | 88 +++++++++---------- .../java/tool/updater/UpdateController.java | 12 +-- src/main/resources/changelog.md | 16 ++-- src/main/resources/release_notes.md | 2 +- utils/buildResources/HO.install4j | 6 +- utils/buildResources/changelog.html | 6 +- .../pythonScripts/update_foxtrick_ho_json.py | 2 +- 18 files changed, 109 insertions(+), 115 deletions(-) diff --git a/docs/README.md b/docs/README.md index 034536753..34bf6c915 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@
- HO logo + HO logo
**Helper Tool for online-manager [Hattrick](http://www.hattrick.org)** @@ -8,7 +8,7 @@ Latest Release - + latest release @@ -16,7 +16,7 @@ Latest Beta Version - + latest beta version @@ -24,7 +24,7 @@ Latest Development Version - + latest development version @@ -32,7 +32,7 @@ License - + license @@ -49,7 +49,7 @@ Lines of code - Lines of code + Lines of code diff --git a/docs/contributing.md b/docs/contributing.md index ab251ce02..bb979837b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -31,7 +31,7 @@ You will need your own fork to work on the code. Go to the HO project page and h ~~~ git clone https://github.com/your-user-name/HO.git HO-yourname cd HO-yourname -git remote add upstream https://github.com/akasolace/ho.git +git remote add upstream https://github.com/ho-dev/HattrickOrganizer.git ~~~ This creates the directory HO-yourname and connects your repository to the upstream (main project) HO repository. @@ -110,8 +110,8 @@ If you added the upstream repository as described above you will see something l ~~~ origin git@github.com:yourname/HO.git (fetch) origin git@github.com:yourname/HO.git (push) -upstream git://github.com/akasolace/ho.git (fetch) -upstream git://github.com/akasolace/ho.git (push) +upstream git://github.com/ho-dev/HattrickOrganizer.git (fetch) +upstream git://github.com/ho-dev/HattrickOrganizer.git (push) ~~~ Now your code is on GitHub, but it is not yet a part of the HO project. For that to happen, a pull request needs to be submitted on GitHub. diff --git a/docs/installing_ho.rst b/docs/installing_ho.rst index 2d6038ece..f2885af4f 100644 --- a/docs/installing_ho.rst +++ b/docs/installing_ho.rst @@ -41,7 +41,7 @@ Latest stable version All versions of HO! can be downloaded from the release page but usually you will want only to use the latest `stable -version `__ +version `__ Directory structure **************************************************** diff --git a/docs/release_notes(stable).md b/docs/release_notes(stable).md index 063b7c316..2e9bfebd0 100644 --- a/docs/release_notes(stable).md +++ b/docs/release_notes(stable).md @@ -5,7 +5,7 @@ * refactoring of lineup panel (#1267) * enable more than three teams (#1415) -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A6.0) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A6.0) ### Database * reducing data base file's disk space accelerates HO startup duration (#958) diff --git a/src/main/java/core/gui/Credits.java b/src/main/java/core/gui/Credits.java index a1aaa7267..8f5636420 100644 --- a/src/main/java/core/gui/Credits.java +++ b/src/main/java/core/gui/Credits.java @@ -6,7 +6,6 @@ import core.gui.theme.HOIconName; import core.gui.theme.ThemeManager; import core.model.HOVerwaltung; -import core.model.UserParameter; import core.util.BrowserLauncher; import core.util.HOLogger; @@ -54,7 +53,7 @@ public static void showCredits(Component parent) { hoPanel.add(hoLabel, gbc); gbc.gridx = 1; - JLabel linkLabel = new HyperLinkLabel("https://akasolace.github.io/HO/"); + JLabel linkLabel = new HyperLinkLabel("https://github.com/ho-dev/HattrickOrganizer/"); hoPanel.add(linkLabel, gbc); gbc.gridy = 4; @@ -76,7 +75,7 @@ public static void showCredits(Component parent) { int result = JOptionPane.showOptionDialog(parent, creditsPanel, HOVerwaltung.instance().getLanguageString("window.about.title"), JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, options1, null); if (result == JOptionPane.YES_OPTION) { try { - BrowserLauncher.openURL("https://raw.githubusercontent.com/akasolace/HO/master/LICENSE"); + BrowserLauncher.openURL("https://raw.githubusercontent.com/ho-dev/HattrickOrganizer/master/LICENSE"); } catch (Exception ex) { HOLogger.instance().log(HOMainFrame.class, ex); } diff --git a/src/main/java/core/gui/HOMainFrame.java b/src/main/java/core/gui/HOMainFrame.java index ec71e63c6..f442f8490 100644 --- a/src/main/java/core/gui/HOMainFrame.java +++ b/src/main/java/core/gui/HOMainFrame.java @@ -338,11 +338,11 @@ public void actionPerformed(ActionEvent actionEvent) { } else if (source.equals(m_jmAboutAbout)) { Credits.showCredits(HOMainFrame.instance()); } else if (source.equals(m_jmHomepageItem)) { // Homepage - openURL("https://akasolace.github.io/HO/"); + openURL("https://ho-dev.github.io/HattrickOrganizer/"); } else if (source.equals(m_jmWikiItem)) { // User Guide openURL("https://ho.readthedocs.io/"); } else if (source.equals(m_jmReportAbug)) { // Report a bug - openURL("https://github.com/akasolace/HO/issues/new/choose"); + openURL("https://github.com/ho-dev/HattrickOrganizer/issues/new/choose"); } else if (source.equals(m_jmCheckUpdate)) { diff --git a/src/main/java/core/net/MyConnector.java b/src/main/java/core/net/MyConnector.java index 6ab68a6d2..2f34d0932 100644 --- a/src/main/java/core/net/MyConnector.java +++ b/src/main/java/core/net/MyConnector.java @@ -335,7 +335,7 @@ public String uploadMatchOrder(int matchId, int teamId, MatchType matchType, Str String result = readStream(postWebFileWithBodyParameters(htUrl + urlpara, paras, true, "set_matchorder")); String sError = XMLCHPPPreParser.getError(result); - if (sError.length() > 0) { + if (!sError.isEmpty()) { throw new RuntimeException(sError); } return result; @@ -548,15 +548,15 @@ public VersionInfo getVersion(String url) { } public VersionInfo getLatestStableVersion() { - return getVersion("https://github.com/akasolace/HO/releases/download/tag_stable/version.properties"); + return getVersion("https://github.com/ho-dev/HattrickOrganizer/releases/download/tag_stable/version.properties"); } public VersionInfo getLatestVersion() { - return getVersion("https://github.com/akasolace/HO/releases/download/dev/version.properties"); + return getVersion("https://github.com/ho-dev/HattrickOrganizer/releases/download/dev/version.properties"); } public VersionInfo getLatestBetaVersion() { - return getVersion("https://github.com/akasolace/HO/releases/download/beta/version.properties"); + return getVersion("https://github.com/ho-dev/HattrickOrganizer/releases/download/beta/version.properties"); } // /////////////////////////////////////////////////////////////////////////////// @@ -584,7 +584,7 @@ public void enableProxy(ProxySettings proxySettings) { */ public String fetchRegionID(int teamId) { String xml = fetchTeamDetails(teamId); - if ( xml.length()>0){ + if (!xml.isEmpty()){ return XMLTeamDetailsParser.fetchRegionID(xml); } return "-1"; @@ -623,7 +623,7 @@ private String getCHPPWebFile(String surl) { while (tryAgain) { OAuthRequest request = new OAuthRequest(Verb.GET, surl); infoHO(request); - if (m_OAAccessToken == null || m_OAAccessToken.getToken().length() == 0) { + if (m_OAAccessToken == null || m_OAAccessToken.getToken().isEmpty()) { iResponse = 401; } else { m_OAService.signRequest(m_OAAccessToken, request); @@ -638,7 +638,7 @@ private String getCHPPWebFile(String surl) { saveCHPP(surl, returnString); } String sError = XMLCHPPPreParser.getError(returnString); - if (sError.length() > 0) { + if (!sError.isEmpty()) { throw new RuntimeException(sError); } tryAgain = false; @@ -763,7 +763,7 @@ public InputStream postWebFileWithBodyParameters(String surl, Map... + * ... * ... * ... * ... (Schum) diff --git a/src/main/java/core/util/Updater.java b/src/main/java/core/util/Updater.java index 5d35ccf2b..443dbe965 100644 --- a/src/main/java/core/util/Updater.java +++ b/src/main/java/core/util/Updater.java @@ -51,9 +51,9 @@ public static ReleaseChannel byXmlURL(String xmlURL) { } } - private static final String DEV_UPDATE_XML_URL = "https://github.com/akasolace/HO/releases/download/dev/updates.xml"; - private static final String BETA_UPDATE_XML_URL = "https://github.com/akasolace/HO/releases/download/beta/updates.xml"; - private static final String STABLE_UPDATE_XML_URL = "https://github.com/akasolace/HO/releases/download/tag_stable/updates.xml"; + private static final String DEV_UPDATE_XML_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/dev/updates.xml"; + private static final String BETA_UPDATE_XML_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/beta/updates.xml"; + private static final String STABLE_UPDATE_XML_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/tag_stable/updates.xml"; private static final String UPDATER_APPLICATION_ID = "814"; private @Nullable String mediaID = null; private static Updater clUpdater; diff --git a/src/main/java/module/pluginFeedback/FeedbackPanel.java b/src/main/java/module/pluginFeedback/FeedbackPanel.java index 69dcd4c4a..d4f21fb8e 100644 --- a/src/main/java/module/pluginFeedback/FeedbackPanel.java +++ b/src/main/java/module/pluginFeedback/FeedbackPanel.java @@ -57,7 +57,7 @@ public boolean parseHTRating(String input) { Matcher matcher; String regex; - if (input.equals("")) { + if (input.isEmpty()) { return false; } @@ -290,7 +290,7 @@ private void sendToServer() { private boolean fetchRequiredLineup() { try { - URL url = new URL("https://akasolace.github.io/HO/feedback.json"); + URL url = new URL("https://ho-dev.github.io/HattrickOrganizer/feedback.json"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.connect(); @@ -329,28 +329,24 @@ private void formatPlayerBox(JLabel jl, String pos, Byte order) { String tw = "(" + hoi.getLanguageString("ls.player.behaviour.towardswing.short").toUpperCase() + ")"; switch (order) { - case IMatchRoleID.NORMAL: - break; - case IMatchRoleID.OFFENSIVE: - s_order += " " + off + " " + down_arrow; - break; - case IMatchRoleID.DEFENSIVE: - s_order += " " + def + " " + up_arrow; - break; - case IMatchRoleID.TOWARDS_WING: + case IMatchRoleID.NORMAL -> { + } + case IMatchRoleID.OFFENSIVE -> s_order += " " + off + " " + down_arrow; + case IMatchRoleID.DEFENSIVE -> s_order += " " + def + " " + up_arrow; + case IMatchRoleID.TOWARDS_WING -> { if (righSide.contains(pos)) { s_order = left_arrow + " " + s_order + " " + tw; } else { s_order = s_order + " " + tw + " " + right_arrow; } - break; - case IMatchRoleID.TOWARDS_MIDDLE: + } + case IMatchRoleID.TOWARDS_MIDDLE -> { if (!righSide.contains(pos)) { s_order = left_arrow + " " + s_order + " " + tm; } else { s_order = s_order + " " + tm + " " + right_arrow; } - break; + } } jl.setText(s_order); } @@ -691,7 +687,7 @@ private void initComponents() { } - private class SimpleLineup { + private static class SimpleLineup { String server_url; String server_status; String lineupName; diff --git a/src/main/java/module/transfer/scout/MiniScoutDialog.java b/src/main/java/module/transfer/scout/MiniScoutDialog.java index 25130139f..c3f0d38a0 100644 --- a/src/main/java/module/transfer/scout/MiniScoutDialog.java +++ b/src/main/java/module/transfer/scout/MiniScoutDialog.java @@ -28,7 +28,6 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.Serial; -import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.List; @@ -260,13 +259,13 @@ private void copyPaste() { jtaCopyPaste.setText(""); - if (message.equals("")) { + if (message.isEmpty()) { switch (pc.getStatus()) { case PlayerConverter.WARNING -> { message = HOVerwaltung.instance().getLanguageString("scout_warning"); message += " " + getFieldsTextList(pc.getErrorFields()); message += "
" + HOVerwaltung.instance().getLanguageString("bug_ticket"); - if (pc.getNotSupportedFields().size() > 0) { + if (!pc.getNotSupportedFields().isEmpty()) { message += "
" + HOVerwaltung.instance().getLanguageString("scout_not_supported_fields"); message += " " + getFieldsTextList(pc.getNotSupportedFields()); } @@ -278,7 +277,7 @@ private void copyPaste() { case PlayerConverter.EMPTY_INPUT_ERROR -> message = HOVerwaltung.instance().getLanguageString("scout_error_input_empty"); default -> { message = HOVerwaltung.instance().getLanguageString("scout_success"); - if (pc.getNotSupportedFields().size() > 0) { + if (!pc.getNotSupportedFields().isEmpty()) { message += "
" + HOVerwaltung.instance().getLanguageString("scout_not_supported_fields"); message += " " + getFieldsTextList(pc.getNotSupportedFields()); } @@ -290,7 +289,7 @@ private void copyPaste() { private String getFieldsTextList(List fields){ StringBuilder errorFieldsTxt = new StringBuilder(); - if (fields.size()>0){ + if (!fields.isEmpty()){ //errorFieldsTxt = " ("; for (int i=0;i=1) { @@ -533,7 +532,7 @@ private void initComponents() { copyPastePanel.setLayout(new BorderLayout()); jlExplainGuide = new JLabel(HOVerwaltung.instance().getLanguageString("ExplainHowToUseTransferScout")); copyPastePanel.add(jlExplainGuide ,BorderLayout.NORTH); - JLabel linkLabel = new HyperLinkLabel("https://github.com/akasolace/HO/wiki/Transfer-Scout", "https://github.com/akasolace/HO/wiki/Transfer-Scout"); + JLabel linkLabel = new HyperLinkLabel("https://github.com/ho-dev/HattrickOrganizer/wiki/Transfer-Scout", "https://github.com/ho-dev/HattrickOrganizer/wiki/Transfer-Scout"); copyPastePanel.add(linkLabel, BorderLayout.CENTER); copyPastePanel.add(new JScrollPane(jtaCopyPaste),BorderLayout.SOUTH); panel.add(copyPastePanel, BorderLayout.NORTH); diff --git a/src/main/java/module/transfer/scout/TransferEingabePanel.java b/src/main/java/module/transfer/scout/TransferEingabePanel.java index 0b8e29152..14e850e86 100644 --- a/src/main/java/module/transfer/scout/TransferEingabePanel.java +++ b/src/main/java/module/transfer/scout/TransferEingabePanel.java @@ -178,7 +178,7 @@ public final void actionPerformed(ActionEvent actionEvent) { final core.model.player.Player tempPlayer = new core.model.player.Player(); tempPlayer.setNationalityAsInt(HOVerwaltung.instance().getModel().getBasics().getLand()); tempPlayer.setPlayerID(getNextTempSpielerID()); - if (jtfName.getText().trim().equals("")) { + if (jtfName.getText().trim().isEmpty()) { tempPlayer.setLastName("Temp " + Math.abs(1000 + tempPlayer.getPlayerID())); } else { tempPlayer.setLastName(jtfName.getText()); @@ -387,44 +387,44 @@ private void setLabels() { + " (" + tempPlayer.getIdealPositionStrength(true, true, 1, null, false) + "%)"); - jpRatingKeeper.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.KEEPER, true, null, false)) + ""); - jpRatingDefender.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.CENTRAL_DEFENDER, true, null, false)) + ""); - jpRatingDefenderTowardsWing.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.CENTRAL_DEFENDER_TOWING, true, null, false)) + ""); - jpRatingDefenderOffensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.CENTRAL_DEFENDER_OFF, true, null, false)) + ""); - jpRatingWingback.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.BACK, true, null, false)) + ""); - jpRatingWingbackTowardsMiddle.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.BACK_TOMID, true, null, false)) + ""); - jpRatingWingbackOffensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.BACK_OFF, true, null, false)) + ""); - jpRatingWingbackDefensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.BACK_DEF, true, null, false)) + ""); - jpRatingMidfielder.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER, true, null, false)) + ""); - jpRatingMidfielderTowardsWing.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER_TOWING, true, null, false)) + ""); - jpRatingMidfielderOffensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER_OFF, true, null, false)) + ""); - jpRatingMidfielderDefensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER_DEF, true, null, false)) + ""); - jpRatingWinger.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER, true, null, false)) + ""); - jpRatingWingerTowardsMiddle.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER_TOMID, true, null, false)) + ""); - jpRatingWingerOffensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER_OFF, true, null, false)) + ""); - jpRatingWingerDefensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER_DEF, true, null, false)) + ""); - jpRatingForward.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.FORWARD, true, null, false)) + ""); - jpRatingForwardTowardsWing.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.FORWARD_TOWING, true, null, false)) + ""); - jpRatingForwardDefensive.getLeft().setText(Helper.getNumberFormat(false, core.model.UserParameter.instance().nbDecimals) - .format(tempPlayer.calcPosValue(IMatchRoleID.FORWARD_DEF, true, null, false)) + ""); + jpRatingKeeper.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.KEEPER, true, null, false))); + jpRatingDefender.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.CENTRAL_DEFENDER, true, null, false))); + jpRatingDefenderTowardsWing.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.CENTRAL_DEFENDER_TOWING, true, null, false))); + jpRatingDefenderOffensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.CENTRAL_DEFENDER_OFF, true, null, false))); + jpRatingWingback.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.BACK, true, null, false))); + jpRatingWingbackTowardsMiddle.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.BACK_TOMID, true, null, false))); + jpRatingWingbackOffensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.BACK_OFF, true, null, false))); + jpRatingWingbackDefensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.BACK_DEF, true, null, false))); + jpRatingMidfielder.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER, true, null, false))); + jpRatingMidfielderTowardsWing.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER_TOWING, true, null, false))); + jpRatingMidfielderOffensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER_OFF, true, null, false))); + jpRatingMidfielderDefensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.MIDFIELDER_DEF, true, null, false))); + jpRatingWinger.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER, true, null, false))); + jpRatingWingerTowardsMiddle.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER_TOMID, true, null, false))); + jpRatingWingerOffensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER_OFF, true, null, false))); + jpRatingWingerDefensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.WINGER_DEF, true, null, false))); + jpRatingForward.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.FORWARD, true, null, false))); + jpRatingForwardTowardsWing.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.FORWARD_TOWING, true, null, false))); + jpRatingForwardDefensive.getLeft().setText(Helper.getNumberFormat(false, UserParameter.instance().nbDecimals) + .format(tempPlayer.calcPosValue(IMatchRoleID.FORWARD_DEF, true, null, false))); clScoutEntry.setSpeciality(((CBItem) jcbSpeciality.getSelectedItem()).getId()); clScoutEntry.setErfahrung(((CBItem) jcbExperience.getSelectedItem()).getId()); clScoutEntry.setForm(((CBItem) jcbForm.getSelectedItem()).getId()); @@ -545,13 +545,13 @@ private void copyPaste() { jtaCopyPaste.setText(""); - if (message.equals("")) { + if (message.isEmpty()) { switch (pc.getStatus()) { case PlayerConverter.WARNING -> { message = HOVerwaltung.instance().getLanguageString("scout_warning"); message += " " + getFieldsTextList(pc.getErrorFields()); message += "
" + HOVerwaltung.instance().getLanguageString("bug_ticket"); - if (pc.getNotSupportedFields().size() > 0) { + if (!pc.getNotSupportedFields().isEmpty()) { message += "
" + HOVerwaltung.instance().getLanguageString("scout_not_supported_fields"); message += " " + getFieldsTextList(pc.getNotSupportedFields()); } @@ -563,7 +563,7 @@ private void copyPaste() { case PlayerConverter.EMPTY_INPUT_ERROR -> message = HOVerwaltung.instance().getLanguageString("scout_error_input_empty"); default -> { message = HOVerwaltung.instance().getLanguageString("scout_success"); - if (pc.getNotSupportedFields().size() > 0) { + if (!pc.getNotSupportedFields().isEmpty()) { message += "
" + HOVerwaltung.instance().getLanguageString("scout_not_supported_fields"); message += " " + getFieldsTextList(pc.getNotSupportedFields()); } @@ -575,7 +575,7 @@ private void copyPaste() { private String getFieldsTextList(List fields){ StringBuilder errorFieldsTxt = new StringBuilder(); - if (fields.size()>0){ + if (!fields.isEmpty()){ //errorFieldsTxt = " ("; for (int i=0;i=1) { @@ -754,7 +754,7 @@ private void initComponents() { copyPastePanel.setLayout(new BorderLayout()); jlExplainGuide = new JLabel(HOVerwaltung.instance().getLanguageString("ExplainHowToUseTransferScout")); copyPastePanel.add(jlExplainGuide ,BorderLayout.NORTH); - JLabel linkLabel = new HyperLinkLabel("https://github.com/akasolace/HO/wiki/Transfer-Scout", "https://github.com/akasolace/HO/wiki/Transfer-Scout"); + JLabel linkLabel = new HyperLinkLabel("https://github.com/ho-dev/HattrickOrganizer/wiki/Transfer-Scout", "https://github.com/ho-dev/HattrickOrganizer/wiki/Transfer-Scout"); copyPastePanel.add(linkLabel, BorderLayout.CENTER); copyPastePanel.add(new JScrollPane(jtaCopyPaste),BorderLayout.SOUTH); panel.add(copyPastePanel, BorderLayout.NORTH); diff --git a/src/main/java/tool/updater/UpdateController.java b/src/main/java/tool/updater/UpdateController.java index bc11f4ddc..61162ac64 100644 --- a/src/main/java/tool/updater/UpdateController.java +++ b/src/main/java/tool/updater/UpdateController.java @@ -12,9 +12,9 @@ public final class UpdateController { - private static final String RELEASE_NOTES_DEV_URL = "https://github.com/akasolace/HO/releases/download/dev/release_notes.html"; - private static final String RELEASE_NOTES_BETA_URL = "https://github.com/akasolace/HO/releases/download/beta/release_notes.html"; - private static final String RELEASE_NOTES_STABLE_URL = "https://github.com/akasolace/HO/releases/download/tag_stable/release_notes.html"; + private static final String RELEASE_NOTES_DEV_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/dev/release_notes.html"; + private static final String RELEASE_NOTES_BETA_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/beta/release_notes.html"; + private static final String RELEASE_NOTES_STABLE_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/tag_stable/release_notes.html"; /** * Check the external site for the latest version according to user preference regarding release channel @@ -128,9 +128,9 @@ private static void showNoUpdateAvailableDialog() { public static String get_HO_zip_download_url(String full_version, String versionType) { return switch (versionType) { - case "DEV" -> "https://github.com/akasolace/HO/releases/download/dev/HO-" + full_version + "-portable-win-DEV-JRE.zip"; - case "BETA" -> "https://github.com/akasolace/HO/releases/download/beta/HO-" + full_version + "-portable-win-BETA-JRE.zip"; - default -> "https://github.com/akasolace/HO/releases/download/tag_stable/HO-" + full_version + "-portable-win-JRE.zip"; + case "DEV" -> "https://github.com/ho-dev/HattrickOrganizer/releases/download/dev/HO-" + full_version + "-portable-win-DEV-JRE.zip"; + case "BETA" -> "https://github.com/ho-dev/HattrickOrganizer/releases/download/beta/HO-" + full_version + "-portable-win-BETA-JRE.zip"; + default -> "https://github.com/ho-dev/HattrickOrganizer/releases/download/tag_stable/HO-" + full_version + "-portable-win-JRE.zip"; }; } diff --git a/src/main/resources/changelog.md b/src/main/resources/changelog.md index 8bc1eb73d..3f5dfb56a 100644 --- a/src/main/resources/changelog.md +++ b/src/main/resources/changelog.md @@ -10,7 +10,7 @@ ## Highlights * bug fixes -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A7.1) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A7.1) ### Squad * fix click on “Last Match” column when the column has been moved. @@ -59,7 +59,7 @@ Total 288 * fix team spirit influence on midfield rating (#1778) * login dialog shows team logos (#1643) -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A7.0) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A7.0) ### Database * faster and more secure database access using prepared statements (#1593) @@ -145,7 +145,7 @@ Total 234 ## Highlights * bug fixes -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A6.1) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A6.1) ### Installer/Update * fix update error of portable version (#1654) @@ -204,7 +204,7 @@ Reports by Contributors - August 05, 2022 - October 15, 2022 * refactoring of lineup panel (#1267) * enable more than three teams (#1415) -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A6.0) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A6.0) ### Database * reducing data base file's disk space accelerates HO startup duration (#958) @@ -318,7 +318,7 @@ Reports by Contributors - Dec 20, 2021 - August 05, 2022 * refactoring of lineup panel (#1267) * enable more than three teams (#1415) -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A6.0) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A6.0) ### Database * reducing data base file's disk space accelerates HO startup duration (#958) @@ -485,7 +485,7 @@ The translation status varies a lot from one language to another. If you can hel - improving consistency of dark themes - preview of new module youth academy (#367) -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A5.0) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A5.0) ### GUI - theming of training bar indicators (#803) @@ -918,7 +918,7 @@ The translation status varies a lot from one language to another. If you can hel - Rating - **Timeline allowing to see rating evolution over time** - - **re-introduce [User Feedback](https://github.com/akasolace/HO/wiki/FeedBack) in order to allow among other things prediction rating improvement #38 #131** + - **re-introduce [User Feedback](https://github.com/ho-dev/HattrickOrganizer/wiki/FeedBack) in order to allow among other things prediction rating improvement #38 #131** - **Formulas will not use anymore the stars but absolutes and relatives players evaluation’s value #212** - In squad and Lineup, are calculated both the absolute and the relative contribution of a player to the ratings - The absolute is more or less what would be the sum of his contribution to the 7 sectors @@ -934,7 +934,7 @@ The translation status varies a lot from one language to another. If you can hel - - NTHRF: Module is removed, now you can add your NT team in your own HO - see [wiki](https://github.com/akasolace/HO/wiki/NTHRF-since-HO-2.0) + - NTHRF: Module is removed, now you can add your NT team in your own HO - see [wiki](https://github.com/ho-dev/HattrickOrganizer/wiki/NTHRF-since-HO-2.0) - Misc - **Support for all kind of matches #21** diff --git a/src/main/resources/release_notes.md b/src/main/resources/release_notes.md index a0a28a71a..5395a3ce3 100644 --- a/src/main/resources/release_notes.md +++ b/src/main/resources/release_notes.md @@ -4,7 +4,7 @@ * Support for Hattrick's coach changes -## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A8.0) +## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A8.0) ### Database diff --git a/utils/buildResources/HO.install4j b/utils/buildResources/HO.install4j index 6552d0a10..11f597928 100644 --- a/utils/buildResources/HO.install4j +++ b/utils/buildResources/HO.install4j @@ -104,7 +104,7 @@ Categories=Game - + @@ -1159,7 +1159,7 @@ return true; - + @@ -1168,7 +1168,7 @@ return true; chmod 777 /opt/${compiler:sys.shortName} - + diff --git a/utils/buildResources/changelog.html b/utils/buildResources/changelog.html index abfdd0d7c..cffbc2b02 100644 --- a/utils/buildResources/changelog.html +++ b/utils/buildResources/changelog.html @@ -1,4 +1,4 @@ -

Please visit the HO! forum in the CHPP section of Hattrick if you have any questions!
If you find a bug, please open an issue on GitHub

+

Please visit the HO! forum in the CHPP section of Hattrick if you have any questions!
If you find a bug, please open an issue on GitHub

Changelist HO! 5.0

Some numbers:

    @@ -652,7 +652,7 @@

    Added

    Rating

    • Timeline allowing to see rating evolution over time
    • -
    • re-introduce User Feedback in order to allow among other things prediction rating improvement #38 #131
    • +
    • re-introduce User Feedback in order to allow among other things prediction rating improvement #38 #131
    • Formulas will not use anymore the stars but absolutes and relatives players evaluation’s value #212
    • In squad and Lineup, are calculated both the absolute and the relative contribution of a player to the ratings
    • The absolute is more or less what would be the sum of his contribution to the 7 sectors
    • @@ -668,7 +668,7 @@

      Added

  • -

    NTHRF: Module is removed, now you can add your NT team in your own HO - see wiki

  • +

    NTHRF: Module is removed, now you can add your NT team in your own HO - see wiki

  • Misc

  • Support for all kind of matches #21
  • diff --git a/utils/pythonScripts/update_foxtrick_ho_json.py b/utils/pythonScripts/update_foxtrick_ho_json.py index 16848a7dd..9b7ca2f45 100644 --- a/utils/pythonScripts/update_foxtrick_ho_json.py +++ b/utils/pythonScripts/update_foxtrick_ho_json.py @@ -15,7 +15,7 @@ ho_json_str = """ { "type": "ho", - "url": "https://akasolace.github.io/HO/", + "url": "https://ho-dev.github.io/HattrickOrganizer/", "duties" : { "developer" : { "alt": "HO developer"