diff --git a/src/com/jpexs/decompiler/flash/gui/AboutDialog.java b/src/com/jpexs/decompiler/flash/gui/AboutDialog.java index d003a92da..cc1f96649 100644 --- a/src/com/jpexs/decompiler/flash/gui/AboutDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/AboutDialog.java @@ -1,165 +1,212 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.gui; - -import com.jpexs.decompiler.flash.ApplicationInfo; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import javax.swing.BorderFactory; -import javax.swing.Box; -import javax.swing.BoxLayout; -import javax.swing.JButton; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.SwingConstants; - -/** - * - * @author JPEXS - */ -public class AboutDialog extends AppDialog { - - private static final String[] CONTRIBUTORS = new String[]{ - "Paolo Cancedda", - "Capasha", - "focus", - "honfika", - "Krock", - "Laurent LOUVET", - "MaGiC", - "pepka", - "poxyran", - "Rtsjx"}; - private static final String AUTHOR = "JPEXS"; - - public AboutDialog() { - setDefaultCloseOperation(HIDE_ON_CLOSE); - setSize(new Dimension(300, 320)); - setTitle(translate("dialog.title")); - - Container cnt = getContentPane(); - JPanel cp = new JPanel(); - cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); - cnt.setLayout(new BorderLayout()); - cnt.add(cp, BorderLayout.CENTER); - cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS)); - - JPanel appNamePanel = new JPanel(new FlowLayout()); - JLabel jpLabel = new JLabel("JPEXS"); - jpLabel.setAlignmentX(0.5f); - jpLabel.setForeground(new Color(0, 0, 160)); - jpLabel.setFont(new Font("Tahoma", Font.BOLD, 25)); - jpLabel.setHorizontalAlignment(SwingConstants.CENTER); - appNamePanel.add(jpLabel); - - JLabel ffLabel = new JLabel("Free Flash"); - ffLabel.setAlignmentX(0.5f); - ffLabel.setFont(new Font("Tahoma", Font.BOLD, 25)); - ffLabel.setHorizontalAlignment(SwingConstants.CENTER); - appNamePanel.add(ffLabel); - - JLabel decLabel = new JLabel("Decompiler"); - decLabel.setAlignmentX(0.5f); - decLabel.setForeground(Color.red); - decLabel.setFont(new Font("Tahoma", Font.BOLD, 25)); - decLabel.setHorizontalAlignment(SwingConstants.CENTER); - appNamePanel.add(decLabel); - appNamePanel.setAlignmentX(0.5f); - cp.add(appNamePanel); - - JLabel verLabel = new JLabel(translate("version") + " " + ApplicationInfo.version); - verLabel.setAlignmentX(0.5f); - //verLabel.setPreferredSize(new Dimension(300, 15)); - verLabel.setFont(new Font("Tahoma", Font.BOLD, 15)); - verLabel.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(verLabel); - - JLabel byLabel = new JLabel(translate("by")); - byLabel.setAlignmentX(0.5f); - byLabel.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(byLabel); - - JLabel authorLabel = new JLabel(AUTHOR); - authorLabel.setAlignmentX(0.5f); - authorLabel.setForeground(new Color(0, 0, 160)); - authorLabel.setFont(new Font("Tahoma", Font.BOLD, 20)); - //jpexsLabel.setPreferredSize(new Dimension(300, 25)); - authorLabel.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(authorLabel); - - JLabel dateLabel = new JLabel("2010-2014"); - dateLabel.setAlignmentX(0.5f); - //dateLabel.setPreferredSize(new Dimension(300, 10)); - dateLabel.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(dateLabel); - - JLabel transAuthorLabel = new JLabel(translate("translation.author.label")); - transAuthorLabel.setAlignmentX(0.5f); - //transAuthorLabel.setPreferredSize(new Dimension(300, 20)); - transAuthorLabel.setHorizontalAlignment(SwingConstants.CENTER); - JLabel transAuthor = new JLabel(translate("translation.author")); - transAuthor.setAlignmentX(0.5f); - //transAuthor.setPreferredSize(new Dimension(300, 20)); - transAuthor.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(transAuthorLabel); - cp.add(transAuthor); - - JLabel contributorsLabel = new JLabel(translate("contributors")); - contributorsLabel.setAlignmentX(0.5f); - contributorsLabel.setHorizontalAlignment(SwingConstants.CENTER); - contributorsLabel.setFont(contributorsLabel.getFont().deriveFont(Font.BOLD)); - cp.add(contributorsLabel); - - for (String c : CONTRIBUTORS) { - JLabel contributorLabel = new JLabel(c); - contributorLabel.setAlignmentX(0.5f); - contributorLabel.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(contributorLabel); - } - - cp.add(Box.createVerticalStrut(10)); - - LinkLabel wwwLabel = new LinkLabel(ApplicationInfo.PROJECT_PAGE); - wwwLabel.setAlignmentX(0.5f); - wwwLabel.setForeground(Color.blue); - //wwwLabel.setPreferredSize(new Dimension(300, 25)); - wwwLabel.setHorizontalAlignment(SwingConstants.CENTER); - cp.add(wwwLabel); - cp.add(Box.createVerticalStrut(10)); - JButton okButton = new JButton(translate("button.ok")); - okButton.setAlignmentX(0.5f); - cp.add(okButton); - okButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - setVisible(false); - } - }); - getRootPane().setDefaultButton(okButton); - setModal(true); - View.centerScreen(this); - View.setWindowIcon(this); - setResizable(false); - pack(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +import com.jpexs.decompiler.flash.ApplicationInfo; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.ResourceBundle; +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.SwingConstants; + +/** + * + * @author JPEXS + */ +public class AboutDialog extends AppDialog { + + private static final String[] DEVELOPERS = new String[]{ + "JPEXS", + "honfika", + "+ others from GitHub and Google code" + }; + private static final String AUTHOR = "JPEXS"; + + public AboutDialog() { + setDefaultCloseOperation(HIDE_ON_CLOSE); + //setSize(new Dimension(300, 320)); + setTitle(translate("dialog.title")); + + JPanel twoPanes=new JPanel(); + twoPanes.setLayout(new BoxLayout(twoPanes, BoxLayout.X_AXIS)); + + Container cnt = getContentPane(); + JPanel cp = new JPanel(); + cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); + cnt.setLayout(new BorderLayout()); + + + + JPanel appNamePanel = new JPanel(new FlowLayout()); + JLabel jpLabel = new JLabel("JPEXS"); + jpLabel.setAlignmentX(0.5f); + jpLabel.setForeground(new Color(0, 0, 160)); + jpLabel.setFont(new Font("Tahoma", Font.BOLD, 25)); + jpLabel.setHorizontalAlignment(SwingConstants.CENTER); + appNamePanel.add(jpLabel); + + JLabel ffLabel = new JLabel("Free Flash"); + ffLabel.setAlignmentX(0.5f); + ffLabel.setFont(new Font("Tahoma", Font.BOLD, 25)); + ffLabel.setHorizontalAlignment(SwingConstants.CENTER); + appNamePanel.add(ffLabel); + + JLabel decLabel = new JLabel("Decompiler"); + decLabel.setAlignmentX(0.5f); + decLabel.setForeground(Color.red); + decLabel.setFont(new Font("Tahoma", Font.BOLD, 25)); + decLabel.setHorizontalAlignment(SwingConstants.CENTER); + appNamePanel.add(decLabel); + appNamePanel.setAlignmentX(0.5f); + + + cp = new JPanel(); + cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); + cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS)); + cp.add(appNamePanel); + JLabel verLabel = new JLabel(translate("version") + " " + ApplicationInfo.version); + verLabel.setAlignmentX(0.5f); + //verLabel.setPreferredSize(new Dimension(300, 15)); + verLabel.setFont(new Font("Tahoma", Font.BOLD, 15)); + verLabel.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(verLabel); + + + cnt.add(cp,BorderLayout.NORTH); + + cp = new JPanel(); + cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); + cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS)); + + + JLabel byLabel = new JLabel(translate("by")); + byLabel.setAlignmentX(0.5f); + byLabel.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(byLabel); + + JLabel authorLabel = new JLabel(AUTHOR); + authorLabel.setAlignmentX(0.5f); + authorLabel.setForeground(new Color(0, 0, 160)); + authorLabel.setFont(new Font("Tahoma", Font.BOLD, 20)); + //jpexsLabel.setPreferredSize(new Dimension(300, 25)); + authorLabel.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(authorLabel); + + JLabel dateLabel = new JLabel("2010-2014"); + dateLabel.setAlignmentX(0.5f); + //dateLabel.setPreferredSize(new Dimension(300, 10)); + dateLabel.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(dateLabel); + + LinkLabel wwwLabel = new LinkLabel(ApplicationInfo.PROJECT_PAGE); + wwwLabel.setAlignmentX(0.5f); + wwwLabel.setForeground(Color.blue); + //wwwLabel.setPreferredSize(new Dimension(300, 25)); + wwwLabel.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(wwwLabel); + + cp.add(Box.createVerticalStrut(20)); + JLabel transAuthorLabel = new JLabel(translate("translation.author.label")); + transAuthorLabel.setAlignmentX(0.5f); + //transAuthorLabel.setPreferredSize(new Dimension(300, 20)); + transAuthorLabel.setHorizontalAlignment(SwingConstants.CENTER); + JLabel transAuthor = new JLabel(translate("translation.author")); + transAuthor.setAlignmentX(0.5f); + transAuthor.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(transAuthorLabel); + cp.add(transAuthor); + cp.add(Box.createVerticalStrut(50)); + JLabel developersLabel = new JLabel(translate("developers")); + developersLabel.setAlignmentX(0.5f); + developersLabel.setHorizontalAlignment(SwingConstants.CENTER); + developersLabel.setFont(developersLabel.getFont().deriveFont(Font.BOLD)); + cp.add(developersLabel); + + + for (String c : DEVELOPERS) { + JLabel developerNameLabel = new JLabel(c); + developerNameLabel.setAlignmentX(0.5f); + developerNameLabel.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(developerNameLabel); + } + + + + + + cp.setAlignmentY(0); + twoPanes.add(cp); + cp = new JPanel(); + cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); + cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS)); + + JLabel translatorsLabel = new JLabel(translate("translators")); + translatorsLabel.setAlignmentX(0.5f); + translatorsLabel.setHorizontalAlignment(SwingConstants.CENTER); + translatorsLabel.setFont(translatorsLabel.getFont().deriveFont(Font.BOLD)); + cp.add(translatorsLabel); + + List translators=new ArrayList<>(); + for(String code:SelectLanguageDialog.languages){ + Locale l = Locale.forLanguageTag(code.equals("en") ? "" : code); + ResourceBundle b = ResourceBundle.getBundle(AppStrings.getResourcePath(AboutDialog.class),l); + translators.add(Locale.forLanguageTag(code).getDisplayName()+" - "+b.getString("translation.author")); + } + for (String c : translators) { + JLabel translatorName = new JLabel(c); + translatorName.setAlignmentX(0.5f); + translatorName.setHorizontalAlignment(SwingConstants.CENTER); + cp.add(translatorName); + } + + cp.add(Box.createVerticalStrut(10)); + cp.setAlignmentY(0); + twoPanes.add(cp); + + cnt.add(twoPanes, BorderLayout.CENTER); + cp = new JPanel(new FlowLayout()); + cnt.add(cp,BorderLayout.SOUTH); + JButton okButton = new JButton(translate("button.ok")); + okButton.setAlignmentX(0.5f); + cp.add(okButton); + okButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + setVisible(false); + } + }); + getRootPane().setDefaultButton(okButton); + setModal(true); + View.setWindowIcon(this); + setResizable(false); + pack(); + View.centerScreen(this); + } +} diff --git a/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java b/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java index ad85681e0..138016003 100644 --- a/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java @@ -43,8 +43,9 @@ public class SelectLanguageDialog extends AppDialog implements ActionListener { JComboBox languageCombobox = new JComboBox<>(); public String languageCode = null; - private static final String[] languages = new String[]{"en", "ca", "cs", "zh", "de", "es", "fr", "hu", "nl", "pl", "pt", "pt-BR", "ru", "sv", "uk"}; - + public static final String[] languages = new String[]{"en", "ca", "cs", "zh", "de", "es", "fr", "hu", "nl", "pl", "pt", "pt-BR", "ru", "sv", "uk"}; + + public SelectLanguageDialog() { setSize(350, 130); Container cnt1 = getContentPane(); diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog.properties index 36c21491c..a6fde8d27 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog.properties @@ -22,3 +22,5 @@ contributors = Contributors: translation.author.label = Author of english translation: #In the translation, insert your name here translation.author = JPEXS +developers = Developers: +translators = Translators: \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog_cs.properties b/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog_cs.properties index ae18bb116..a27c9f458 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AboutDialog_cs.properties @@ -1,24 +1,26 @@ -# Copyright (C) 2010-2014 JPEXS -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -version = verze -by = autor: -button.ok = OK -dialog.title = O aplikaci -contributors = P\u0159isp\u011bvatel\u00e9: -#In the translation, replace "english" with target language name -translation.author.label = Autor \u010desk\u00e9ho p\u0159ekladu: -#In the translation, insert your name here -translation.author = JPEXS +# Copyright (C) 2010-2014 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +version = verze +by = autor: +button.ok = OK +dialog.title = O aplikaci +contributors = P\u0159isp\u011bvatel\u00e9: +#In the translation, replace "english" with target language name +translation.author.label = Autor \u010desk\u00e9ho p\u0159ekladu: +#In the translation, insert your name here +translation.author = JPEXS +developers = V\u00fdvoj\u00e1\u0159i: +translators = P\u0159ekladatel\u00e9: \ No newline at end of file