mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Changed line break behaviour. (#5562)
Added line breaks to PageContentsCreator.java, CategoryEditHelperUnitTests.kt, and MediaDetailFragmentUnitTests.kt following the example given on issue #5523.
This commit is contained in:
parent
0656c88fbe
commit
535792390e
3 changed files with 7 additions and 6 deletions
|
|
@ -44,7 +44,6 @@ public class PageContentsCreator {
|
|||
.append("}}");
|
||||
}
|
||||
buffer
|
||||
.append("\n")
|
||||
.append("|source=").append("{{own}}\n")
|
||||
.append("|author=[[User:").append(media.getAuthor()).append("|")
|
||||
.append(media.getAuthor()).append("]]\n");
|
||||
|
|
@ -68,7 +67,9 @@ public class PageContentsCreator {
|
|||
Utils.getWikiLovesMonumentsYear(Calendar.getInstance()), contribution.getCountryCode()));
|
||||
}
|
||||
|
||||
buffer.append("== {{int:license-header}} ==\n")
|
||||
buffer
|
||||
.append("\n")
|
||||
.append("== {{int:license-header}} ==\n")
|
||||
.append(licenseTemplateFor(media.getLicense())).append("\n\n")
|
||||
.append("{{Uploaded from Mobile|platform=Android|version=")
|
||||
.append(ConfigUtils.getVersionNameWithSha(context)).append("}}\n");
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ class CategoryEditHelperUnitTests {
|
|||
helper.makeCategoryEdit(context, media, listOf("Test"), "== {{int:filedesc}} ==\n" +
|
||||
"{{Information\n" +
|
||||
"|description=\n" +
|
||||
"\n" +
|
||||
"|source={{own}}\n" +
|
||||
"|author=[[User:UserForthBeta|UserForthBeta]]\n" +
|
||||
"|date={{According to Exif data|2022-03-06}}\n" +
|
||||
"}}\n" +
|
||||
"{{Location|22.538830555555556|114.08847222222222}}\n" +
|
||||
"\n" +
|
||||
"== {{int:license-header}} ==\n" +
|
||||
"{{self|cc-zero}}\n" +
|
||||
"\n" +
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ class MediaDetailFragmentUnitTests {
|
|||
"|other versions=\n" +
|
||||
"}}\n" +
|
||||
"{{Location|27.043186|88.267003}}\n" +
|
||||
"{{Assessments|featured=1}}"
|
||||
"{{Assessments|featured=1}}\n"
|
||||
val map = linkedMapOf("en" to "Antique cash register in a cafe, Darjeeling")
|
||||
Assert.assertEquals(map, method.invoke(fragment, s))
|
||||
}
|
||||
|
|
@ -429,7 +429,7 @@ class MediaDetailFragmentUnitTests {
|
|||
"|Other fields = {{Credit line |Author = © [[User:Colin]] | Other = Wikimedia Commons |License = CC-BY-SA-4.0}}\n" +
|
||||
"}}\n" +
|
||||
"{{Location|51.519003|-0.138353}}\n" +
|
||||
"{{Assessments|featured=1}}"
|
||||
"{{Assessments|featured=1}}\n"
|
||||
val map = linkedMapOf("en" to "[[:en:Fitzrovia Chapel|Fitzrovia Chapel]] ceiling<br/>\n")
|
||||
Assert.assertEquals(map, method.invoke(fragment, s))
|
||||
}
|
||||
|
|
@ -487,7 +487,7 @@ class MediaDetailFragmentUnitTests {
|
|||
"|Date =2015-02-17\n" +
|
||||
"|Permission ={{Diliff/Licensing}}\n" +
|
||||
"|other_versions=\n" +
|
||||
"}}"
|
||||
"}}\n"
|
||||
val map = linkedMapOf("en" to "The interior of Sacred Heart RC Church, Wimbledon, London.")
|
||||
Assert.assertEquals(map, method.invoke(fragment, s))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue