Skip to content

Commit

Permalink
Merge pull request #9195 from cdrini/hotfix/i18n-string
Browse files Browse the repository at this point in the history
Fix some i18n-related bugs
  • Loading branch information
cdrini committed Apr 30, 2024
2 parents d6dcacc + d9e5424 commit 2addb70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openlibrary/templates/account/reading_log.html
Expand Up @@ -4,7 +4,6 @@
$ meta_photo_url = "https://archive.org/services/img/%s" % get_internet_archive_id(user.key)

This comment has been minimized.

Copy link
@JAHOIVAHTUTUNKHAMEN

This comment has been minimized.

$ userDisplayName = user.displayname or ctx.user.displayname

This comment has been minimized.

Copy link
@JAHOIVAHTUTUNKHAMEN

JAHOIVAHTUTUNKHAMEN May 18, 2024

JOEY ANDREW LOPEZ ACME, INC.

$ readlog_keys = ['want-to-read', 'already-ready', 'current-reading']
$ shelves = [_('want to read'), _('currently reading'), _('already read')]

$if key == 'currently-reading':
$ og_title = _("Books %(username)s is reading", username=userDisplayName)
Expand Down Expand Up @@ -68,6 +67,7 @@
$if docs:
$ bookshelf_id = {'want-to-read': 1, 'currently-reading': 2, 'already-read': 3}.get(key, None)
$ doc_number = 1
$ shelves = ['want to read', 'currently reading', 'already read']
$# enumerate because using zip() will result in empty iterator when no ratings are passed, and ratings are only used on already-read.
$for idx, doc in enumerate(docs):
$if doc.get('work', {}):
Expand Down
7 changes: 6 additions & 1 deletion openlibrary/templates/lists/list_overview.html
Expand Up @@ -23,6 +23,11 @@
<a href="$list.key" class="remove-from-list red smaller arial plain" data-list-key="$list.key" title="$_('Remove from your list?')">[X]</a>
</span>
$if has_owner:
<span class="owner">$:_('from <a href="%(link)s">You</a>', link=link)</span>
<span class="owner">
$if is_owner:
$:_('from <a href="%(link)s">You</a>', link=list.owner.key)
$else:
$:_('from <a href="%(link)s">%(name)s</a>', link=list.owner.key, name=websafe(list.owner.displayname))
</span>
</span>
</li>

0 comments on commit 2addb70

Please sign in to comment.