From edefbd48aa3dff78e8f7310617a99302f7402f3a Mon Sep 17 00:00:00 2001 From: yvanzo Date: Thu, 31 Aug 2023 11:27:51 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Fix=20curved=20quotation=20marks=20in=20bro?= =?UTF-8?q?ken=20=E2=80=9CAbout=E2=80=9D=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Curved quotation marks were used instead of straight ones as Python string delimiters, whereas they should be used inside strings only. That broke returning the “About” page. This patch fixes delimiters and escaped occurrences. --- critiquebrainz/frontend/templates/index/about.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/critiquebrainz/frontend/templates/index/about.html b/critiquebrainz/frontend/templates/index/about.html index 8bce5cf2..421d0a5d 100644 --- a/critiquebrainz/frontend/templates/index/about.html +++ b/critiquebrainz/frontend/templates/index/about.html @@ -8,24 +8,24 @@

{{ _('About the project') }}

{{ _('What is CritiqueBrainz?') }}

{{ _('CritiqueBrainz is a repository for Creative Commons licensed music and book reviews. - It is based on data from MusicBrainz and BookBrainz, open music and book encyclopedias.’) }} + It is based on data from MusicBrainz and BookBrainz, open music and book encyclopedias.') }}

{{ _('What is it for?') }}

{{ _('Projects like Wikipedia, MusicBrainz and BookBrainz are good at aggregating information about music and books, but their purpose is not suited to expressing opinions. - CritiqueBrainz fills the gap between raw data and music and book critics.’) }} + CritiqueBrainz fills the gap between raw data and music and book critics.') }}

- {{ _(‘This is an open platform. That means everyone can participate and contribute. + {{ _('This is an open platform. That means everyone can participate and contribute. If you want to share your thoughts, you can rate and/or review an album or a book. If you would like, you can read our guide on How to Write Good CritiqueBrainz Reviews. - If you just want to read opinions, that\’s fine too.’) }} + If you just want to read opinions, that\'s fine too.') }}

- {{ _(‘After reading a review you can mark it as useful or not. This helps other + {{ _('After reading a review you can mark it as useful or not. This helps other music and book enthusiasts find good reviews.') }}

@@ -45,7 +45,7 @@

{{ _('Guidelines') }}

{{ _('Your submissions must be your original work. Do not submit content that you do not hold the copyright to, or is not your own. This includes plagiarism and primarily LLM (Large Language Model) or AI generated content. You may wish to use LLM as a tool, but be aware that obviously - LLM generated content will be removed.’) }} + LLM generated content will be removed.') }}

{{ _('If you have had a review hidden please check the Code of Conduct and the guidelines, From 3f000738db1eec1d865be38119542a1878f01c22 Mon Sep 17 00:00:00 2001 From: yvanzo Date: Thu, 31 Aug 2023 11:33:40 +0100 Subject: [PATCH 2/3] Use typographic apostrophes in strings Replace straight single quotes in strings where appropriate. --- critiquebrainz/db/comment.py | 2 +- .../frontend/templates/index/about.html | 2 +- .../frontend/templates/index/guidelines.html | 24 +++++++++---------- .../frontend/templates/log/action.html | 4 ++-- critiquebrainz/frontend/templates/macros.html | 4 ++-- .../frontend/templates/mapping/spotify.html | 4 ++-- .../templates/moderators/moderators.html | 2 +- .../templates/review/delete_comment.html | 4 ++-- .../templates/review/entity/base.html | 2 +- .../frontend/templates/review/report.html | 4 ++-- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/critiquebrainz/db/comment.py b/critiquebrainz/db/comment.py index cd5d2e56..616e1800 100644 --- a/critiquebrainz/db/comment.py +++ b/critiquebrainz/db/comment.py @@ -102,7 +102,7 @@ def get_by_id(comment_id): comment = result.mappings().first() if not comment: - raise db_exceptions.NoDataFoundException('Can\'t find comment with ID: {id}'.format(id=comment_id)) + raise db_exceptions.NoDataFoundException('Can’t find comment with ID: {id}'.format(id=comment_id)) comment = dict(comment) comment['last_revision'] = { diff --git a/critiquebrainz/frontend/templates/index/about.html b/critiquebrainz/frontend/templates/index/about.html index 421d0a5d..35203acb 100644 --- a/critiquebrainz/frontend/templates/index/about.html +++ b/critiquebrainz/frontend/templates/index/about.html @@ -22,7 +22,7 @@

{{ _('What is it for?') }}

If you want to share your thoughts, you can rate and/or review an album or a book. If you would like, you can read our guide on How to Write Good CritiqueBrainz Reviews. - If you just want to read opinions, that\'s fine too.') }} + If you just want to read opinions, that’s fine too.') }}

{{ _('After reading a review you can mark it as useful or not. This helps other diff --git a/critiquebrainz/frontend/templates/index/guidelines.html b/critiquebrainz/frontend/templates/index/guidelines.html index 4a945554..b4224a07 100644 --- a/critiquebrainz/frontend/templates/index/guidelines.html +++ b/critiquebrainz/frontend/templates/index/guidelines.html @@ -18,11 +18,11 @@

{{ _('General tips') }}

{{ _('Write in a comfortable voice') }} -
{{ _('A good review probably won\'t sound like an academic paper, and probably won\'t sound like a YouTube +
{{ _('A good review probably won’t sound like an academic paper, and probably won’t sound like a YouTube comment, but it should sound like you.') }}

- {{ _('Reviews on CritiqueBrainz don\'t have to be in English') }} + {{ _('Reviews on CritiqueBrainz don’t have to be in English') }}
{{ _('You are more than welcome to write review in a language that you prefer to use. Choose a language in which you can express your emotions/thoughts freely.') }}

@@ -49,11 +49,11 @@

{{ _('Content tips') }}

  • {{ _('Good reviews are neither too short nor too long') }} - {{ _('It\'s better to make your reviews neither too short nor too long. Try to write something which gives readers + {{ _('It’s better to make your reviews neither too short nor too long. Try to write something which gives readers a clear image as to what something is like while not being too boring.') }}
  • - {{ _('Don\'t mention just the factual data.') }} + {{ _('Don’t mention just the factual data.') }} {{ _('Sometimes people mention only factual data in their reviews which makes a review look more like a press release.') }}
  • @@ -76,13 +76,13 @@

    {{ _('Albums (Release Groups)') }}

    meaningful? Did it match the music?') }}
    - {{ _('Recording quality matters a lot. If it\'s good it\'s good but if it\'s bad it will flop the whole album. It\'s + {{ _('Recording quality matters a lot. If it’s good it’s good but if it’s bad it will flop the whole album. It’s always better to note these things and mention about it in your review.') }}
  • - {{ _('Be clear with your conclusion - If it\'s a must hear album give it some direction. It\'s always good to mention + {{ _('Be clear with your conclusion - If it’s a must hear album give it some direction. It’s always good to mention the genre of the music. You may try to compare it with some other album which has been already released having the same genre which will give the readers an idea as to what they can expect.') }}
  • @@ -96,13 +96,13 @@

    {{ _('Events') }}

  • {{ _('Writing about the music played there - You may describe which songs were played in the event. Which were your - favourite songs played, you can write about the staging of the band. Were there any things which you didn\'t like? + favourite songs played, you can write about the staging of the band. Were there any things which you didn’t like? If yes, then why?') }}
  • {{ _('Special moments, effects and surprises - Often there are special moments in every event, you may describe such moments that took place. You may also write about special guests(if any) also any special effects in the event - which caught everyone\'s attention.') }} + which caught everyone’s attention.') }}
  • {{ _('Writing about Event atmosphere - You may always describe about the crowd, how well the artists/band were able to @@ -113,18 +113,18 @@

    {{ _('Events') }}

    {{ _('Places') }}

    {{ _('💡 Note:') }} - {{ _('Try to be honest while reviewing, simply don\'t follow the trend. Review the album as to what + {{ _('Try to be honest while reviewing, simply don’t follow the trend. Review the album as to what you felt. And try to follow active voice.') }}

    @@ -135,7 +135,7 @@

    {{ _('Common mistakes') }}

  • {{ _('Overlooking proofreading the review after finishing it.') }}
  • {{ _('Mistakes such as punctuation, typo errors, capitalization etc.') }}
  • {{ _('Writing in slangs - Try to write in proper English (or whatever language you prefer). - It\'s better not to write reviews in slangs.') }}
  • + It’s better not to write reviews in slangs.') }}

    {{ _('Additional material') }}

    diff --git a/critiquebrainz/frontend/templates/log/action.html b/critiquebrainz/frontend/templates/log/action.html index 71630a1a..5a7d99e9 100644 --- a/critiquebrainz/frontend/templates/log/action.html +++ b/critiquebrainz/frontend/templates/log/action.html @@ -9,9 +9,9 @@ {% endif %} {% if action == "hide_review" %} - {% set title = _('Hide %(user)s\'s review of "%(rg)s"', rg=rg_title, user=review.user.display_name) %} + {% set title = _('Hide %(user)s’s review of "%(rg)s"', rg=rg_title, user=review.user.display_name) %} {% elif action == "unhide_review" %} - {% set title = _('Unhide %(user)s\'s review of "%(rg)s"', rg=rg_title, user=review.user.display_name) %} + {% set title = _('Unhide %(user)s’s review of "%(rg)s"', rg=rg_title, user=review.user.display_name) %} {% elif action == "block_user" %} {% set title = _('Block %(user)s', user=user.display_name) %} {% elif action == "unblock_user" %} diff --git a/critiquebrainz/frontend/templates/macros.html b/critiquebrainz/frontend/templates/macros.html index 348a92c6..a4be5af5 100644 --- a/critiquebrainz/frontend/templates/macros.html +++ b/critiquebrainz/frontend/templates/macros.html @@ -118,7 +118,7 @@ {% endif %}