-
Notifications
You must be signed in to change notification settings - Fork 462
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
Support DATE_FANCINESS and updated in base and base-jinja #3135
Conversation
PR fails on baseline check (because of changed content) but is otherwise passing. I have tested the changes locally against my own nikola setup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty good, but we need to make this translatable.
<a href="{{ post.permalink() }}" rel="bookmark"> | ||
<time class="published dt-published" datetime="{{ post.formatted_date('webiso') }}" itemprop="datePublished" title="{{ post.formatted_date(date_format)|e }}">{{ post.formatted_date(date_format)|e }}</time> | ||
{% if post.updated and post.updated != post.date %} | ||
<span class="updated"> updated </span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs translation support, preferably in the style of {published_date} <span class="updated">(updated {updated_date})</span>
because languages might have special requirements. (Translating at least the word updated
is mandatory.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure how to have the messages update span across the <time>...</time>
section but I can certain create a message around "updated".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come to think about it, it won’t be easy to do. Let’s scrap that.
CHANGES.txt
Outdated
@@ -8,6 +8,14 @@ Features | |||
|
|||
* Don’t generate gallery index if the destination directory is | |||
site root and it would conflict with blog index (Issue #3133) | |||
* ``base`` and ``base-jinja`` templates now support updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please copy the change to bootblog4/index.tmpl
and change the line to
* All built-in themes now support ``updated``
Done. I know that updating the messages/* files by hand is not the right way to do things and liable to break the next time someone updates the translations but I could not figure out how to request access to Transifex as an English speaker or otherwise add a new message type. |
Regarding translations, adding them to Transifex requires admin rights, I’ll take care of that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I’ll change it to say (updated XX) because that looks better to me — hope you don’t mind that.
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska changing to (updated XX) is totally fine in my book but I believe you forgot to run Thanks. |
Yeah, I forgot. Fixed on master. |
Pull Request Checklist
Description
This PR changes two things relating to base/base-jinja handling of datetime in posts:
DATE_FANCINESS=0