-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from syeopite/localization-api
Add localization API
- Loading branch information
Showing
18 changed files
with
633 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .base import Formatter | ||
from .base import Formatter, i18n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""This module provides the default localization strings for npf-renderer""" | ||
|
||
from .. import helpers | ||
|
||
DEFAULT_LOCALIZATION = { | ||
"asker_with_no_attribution": "Anonymous", | ||
"asker_and_ask_verb": "{name} asked:", | ||
"unsupported_block_header": "Unsupported NPF block", | ||
"unsupported_block_description": 'Placeholder for the unsupported "{block}" type NPF block\ | ||
Please report me over at https://github.com/syeopite/npf-renderer', | ||
"generic_image_alt_text": "image", | ||
"link_block_poster_alt_text": 'Preview image for "{site}"', | ||
"link_block_fallback_embeds_are_disabled": "Embeds are disabled", | ||
"error_video_link_block_fallback_heading": "Error: unable to render video block", | ||
"video_link_block_fallback_description": "Please click me to watch on the original site", | ||
"error_link_block_fallback_native_video_player_non_tumblr_source": "Error: non-tumblr source for video player", | ||
"fallback_audio_block_thumbnail_alt_text": "Album art", | ||
"error_audio_link_block_fallback_heading": "Error: unable to render audio block", | ||
"audio_link_block_fallback_description": "Please click me to listen on the original site", | ||
"error_link_block_fallback_native_audio_player_non_tumblr_source": "Error: non-tumblr source for audio player", | ||
"plural_poll_total_votes": lambda votes: f"{votes} votes", | ||
"poll_remaining_time": "Remaining time: {duration}", | ||
"poll_ended_on": "Ended on: {ended_date}", | ||
"post_attribution": "From {0}", | ||
"blog_attribution": "Created by {0}", | ||
"app_attribution": "View on {0}", | ||
"unsupported_attribution": 'Attributed via an unsupported ("{0}") attribution type. Please report this over at https://github.com/syeopite/npf-renderer', | ||
"format_duration_func": lambda duration: str(duration), | ||
"format_datetime_func": lambda datetime: str(datetime), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.