Skip to content

Commit

Permalink
Issue: Commons file description syntax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manimaran96 committed Dec 12, 2021
1 parent 1580092 commit bd135fd
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,16 +626,16 @@ class RecordAudioActivity : BaseActivity() {
// File License
// File Category
private fun getCommonsContentAndLicense(): String {
return """
== {{int:filedesc}} ==
{{Information
${if (getFileDescription() != null) "|description=${getFileDescription()}\n" else ""}|source={{own}}|author=[[User:${pref.name}|${pref.name}]]
|date=${getDateToString(DF_YYYY_MM_DD)}
}}
== {{int:license-header}} ==
${getLicenseTemplateInWiki(pref.uploadAudioLicense)}
${getCategoryInfo()}
""".trimIndent()
val sb:StringBuilder = StringBuilder()
sb.append("== {{int:filedesc}} ==").append("\n")
sb.append("{{Information").append("\n")
sb.append(if (getFileDescription() != null) "|description=${getFileDescription()}\n" else "")
sb.append("|source={{own}}").append("|author=[[User:${pref.name}|${pref.name}]]").append("|date=${getDateToString(DF_YYYY_MM_DD)}").append("\n")
sb.append("}}").append("\n")
sb.append("== {{int:license-header}} ==").append("\n")
sb.append(getLicenseTemplateInWiki(pref.uploadAudioLicense)).append("\n")
sb.append(getCategoryInfo())
return sb.toString()
}

private fun getFileDescription(): String? {
Expand Down

0 comments on commit bd135fd

Please sign in to comment.