[fix/typo] Fix the tafseer word typos

This commit is contained in:
Anas Elgarhy 2023-05-25 23:54:58 +03:00
parent e8a0dd8ed6
commit 5920e1bc08
No known key found for this signature in database
GPG key ID: 0501802A1D496528
2 changed files with 14 additions and 14 deletions

View file

@ -73,11 +73,11 @@
<gridbag weightx="0.0" weighty="1.0"/>
</constraints>
<properties>
<text value="Tafser/Translation"/>
<text value="Tafseer/Translation"/>
<verifyInputWhenFocusTarget value="false"/>
</properties>
</component>
<component id="1bfe0" class="javax.swing.JComboBox" binding="tafserAndTranslationComboBox">
<component id="1bfe0" class="javax.swing.JComboBox" binding="tafseerAndTranslationComboBox">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="1.0"/>
@ -196,7 +196,7 @@
<properties/>
<border type="none"/>
<children>
<component id="db36" class="javax.swing.JTextArea" binding="tafserTextArea">
<component id="db36" class="javax.swing.JTextArea" binding="tafseerTextArea">
<constraints/>
<properties>
<editable value="false"/>

View file

@ -32,8 +32,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
private JButton previousButton;
private JButton nextButton;
private JCheckBox autoPlayCheckBox;
private JTextArea tafserTextArea;
private JComboBox<ReadableEdition> tafserAndTranslationComboBox;
private JTextArea tafseerTextArea;
private JComboBox<ReadableEdition> tafseerAndTranslationComboBox;
private JComboBox<ReadableEdition> editionComboBox;
private boolean isPlaying;
private AudioPlayer audioPlayer;
@ -76,7 +76,7 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
}
});
tafserAndTranslationComboBox.setModel(tafserAndTranslationComboBoxModel);
tafseerAndTranslationComboBox.setModel(tafserAndTranslationComboBoxModel);
editionComboBox.setModel(editionComboBoxModel);
// Set the default selected item for the editionComboBox
@ -91,8 +91,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
surahNameLabel.setText(ayah.getSurah().getName());
numberOfAyahInSuarhLabel.setText("آية رقم: " + ayah.getNumberInSurah());
ayahRevelationType.setText(ayah.getSurah().getRevelationType().getArabicName());
// Update the tafser or translation
updateTheTauserTextArea();
// Update the tafseer or translation
updateTheTauseerTextArea();
}
private void addListeners() {
@ -133,8 +133,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
}
});
tafserAndTranslationComboBox.addActionListener(e -> {
updateTheTauserTextArea();
tafseerAndTranslationComboBox.addActionListener(e -> {
updateTheTauseerTextArea();
});
editionComboBox.addActionListener(e -> {
@ -167,15 +167,15 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
}
private void updateTheTauserTextArea() {
private void updateTheTauseerTextArea() {
final var selectedEdition = ((ReadableEdition) Objects.requireNonNull(
tafserAndTranslationComboBox.getSelectedItem())).getEdition();
tafseerAndTranslationComboBox.getSelectedItem())).getEdition();
try {
tafserTextArea.setText(Ayah.getAyah(ayah.getNumber(), selectedEdition).getText());
tafseerTextArea.setText(Ayah.getAyah(ayah.getNumber(), selectedEdition).getText());
} catch (final IOException ioException) {
ioException.printStackTrace();
JOptionPane.showMessageDialog(this,
"Error while loading the tafser - check your internet connection",
"Error while loading the tafseer - check your internet connection",
"Error", JOptionPane.ERROR_MESSAGE);
}
}