Bakual / SermonSpeaker

A free Joomla! component for churchs to share their sermons.
www.sermonspeaker.net
GNU General Public License v3.0
12 stars 8 forks source link

Use language strings instead of hard-coded values in xml #59

Closed imanickam closed 5 years ago

imanickam commented 5 years ago

In the file mod_sermoncast.xml, as shown below, the values such as Auto, Audio, and Video are hard-coded instead of using the language strings.

<field name="sc_type" type="list" 
                    label="MOD_SERMONCAST_FIELD_TYPE_LABEL" 
                    description="MOD_SERMONCAST_FIELD_TYPE_DESC"
                    default="">
                    <option value="">Auto</option>
                    <option value="audio">Audio</option>
                    <option value="video">Video</option>
                </field>

In the file default.xml, as shown below, the values such as Auto, Audio, and Video are hard-coded instead of using the language strings.

<field name="type" type="list"
                   label="COM_SERMONSPEAKER_FIELD_TYPE_LABEL"
                   description="COM_SERMONSPEAKER_FIELD_TYPE_DESC"
                   default="">
                <option value="">Auto</option>
                <option value="audio">Audio</option>
                <option value="video">Video</option>
            </field>

This PR will replace the hard-coded options "Auto", "Audio", and "Video" with the new language strings formed that would be consistent with similar implementations.

imanickam commented 5 years ago

(a) The following language string is available in the language file en-GB.ini located in the directory \administrator\language\en-GB\en-GB.ini. JGLOBAL_AUTO="Auto" Probably this could be used in the place of the new language strings MOD_SERMONCAST_FIELD_TYPE_OPTION_AUTO and COM_SERMONSPEAKER_FIELD_TYPE_OPTION_AUTO.

(b) I believe that the changes in the file en-GB.mod_sermoncast.ini and en-GB.com_sermonspeaker.ini would reflect in Crowdin.

Bakual commented 5 years ago

Thanks for this. I'm going to replace the MOD_SERMONCAST_FIELD_TYPE_OPTION_AUTO one with JGLOBAL_AUTO but rest is fine.

imanickam commented 5 years ago

Also, please replace COM_SERMONSPEAKER_FIELD_TYPE_OPTION_AUTO with JGLOBAL_AUTO.

Bakual commented 5 years ago

Yep, did that.