Skip to content

Change line break behaviour of description template #5523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Speravir opened this issue Feb 7, 2024 · 8 comments · Fixed by #5562
Closed

Change line break behaviour of description template #5523

Speravir opened this issue Feb 7, 2024 · 8 comments · Fixed by #5562

Comments

@Speravir
Copy link

Speravir commented Feb 7, 2024

Description

Caveat: I’m not a Commons app user and so do not know it at all. Hence I may make some wrong assumptions.

I frequently work in the source of file descriptions and noticed a strange behaviour regarding a line break in a place I wouldn’t set it. Instead, I miss a line break, where I’ve expected one. These (missing) line breaks do not any harm for the output, so this is not urgent, but should anyway be easy to fix. Look at source of example file File:20240128 xl 1147-Treffpunkt Freizeit.jpg. It looks like this (stripped last lines and most values from template parameters):

== {{int:filedesc}} ==
{{Information
|description={{de|1=$CONTENT}}

|source={{own}}
|author=$AUTHOR
|date=$DATE
}}
{{Location|$COORDINATES}}
== {{int:license-header}} ==
{{self|cc-by-sa-4.0}}

Between the parameters |description and |source there is a spurious line I’d love to be removed. But then after the {{Location}} template and before the header for the license section I miss a line break.

I noticed this a while ago, but recently asked @OpenGreenStreet for the reason and he pointed my to the App as cause of this.

Also ping @nicolas-raoul who, as well, recommended opening an issue for this. Here is an example file uploaded by him with the same source appearance: File:2004 Commons Android app - Metadata selection.png. This has, of course, no Location template, and therefore the license header follows straight after the information template.

@nicolas-raoul
Copy link
Member

Just to be clear, you'd like the wikicode to be like below, right?

== {{int:filedesc}} ==
{{Information
|description={{de|1=$CONTENT}}
|source={{own}}
|author=$AUTHOR
|date=$DATE
}}
{{Location|$COORDINATES}}

== {{int:license-header}} ==
{{self|cc-by-sa-4.0}}

@Speravir
Copy link
Author

Speravir commented Feb 8, 2024

you'd like the wikicode to be like below, right?

Yes, exactly.

@ivanacha
Copy link
Contributor

Hey! I'm an open-source newbie, and I'd love to take up this issue.

@nicolas-raoul
Copy link
Member

@ivanacha It is yours, thanks! 🙂

@ivanacha
Copy link
Contributor

👍Working on it right now

@ivanacha It is yours, thanks! 🙂

ivanacha added a commit to ivanacha/apps-android-commons that referenced this issue Feb 18, 2024
Added line breaks to PageContentsCreator.java, CategoryEditHelperUnitTests.kt, and MediaDetailFragmentUnitTests.kt following the example given on issue commons-app#5523.
@nicolas-raoul
Copy link
Member

@Speravir Thanks to Ivan's contribution the issue seems fixed now:

== {{int:filedesc}} ==
{{Information
|description=
|source={{own}}
|author=[[User:Syced|Syced]]
|date={{According to Exif data|2024-02-24}}
}}
{{Location|35.44607222222222|139.63065555555556}}

== {{int:license-header}} ==
{{self|cc-zero}}

{{Uploaded from Mobile|platform=Android|version=4.2.1-debug-main~47aac53ac}}

[[Category:Yokohama]]
[[Category:Shopping streets in Japan]]

https://commons.wikimedia.org/wiki/File:Harmonica_Yokocho_4.jpg

nicolas-raoul pushed a commit that referenced this issue Feb 25, 2024
Added line breaks to PageContentsCreator.java, CategoryEditHelperUnitTests.kt, and MediaDetailFragmentUnitTests.kt following the example given on issue #5523.
@Speravir
Copy link
Author

Yes, it apparently looks like this, thanks to @ivanacha (I had noticed #5562 myself days ago). But I will only confirm, after @OpenGreenStreet will have uploaded some files with proper wikitext. 😁 Just joking. I assume he simply needs an update, isn’t he?

@OpenGreenStreet
Copy link

I would assume the same. I currently still have version 4.2.1~14b6c455b and there are currently no updates for me in the Play Store.
@Speravir If no update is required, here is a file that I uploaded yesterday: https://commons.wikimedia.org/wiki/File:20240225_xl_0919-Zuwegung_zu_Bahnhof_Waren_(M%C3%BCritz).jpg

ShashwatKedia pushed a commit to ShashwatKedia/apps-android-commons that referenced this issue Mar 1, 2024
Added line breaks to PageContentsCreator.java, CategoryEditHelperUnitTests.kt, and MediaDetailFragmentUnitTests.kt following the example given on issue commons-app#5523.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants