mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 03:37:28 +01:00
Fix remaining instances of package type as a gettext parameter
Fixes #355
This commit is contained in:
parent
2869876b67
commit
80499dbf6c
@ -108,6 +108,15 @@ class PackageType(enum.Enum):
|
|||||||
return lazy_gettext(u"%(display_name)s has a texture pack placed at #%(place)d.",
|
return lazy_gettext(u"%(display_name)s has a texture pack placed at #%(place)d.",
|
||||||
display_name=display_name, place=place)
|
display_name=display_name, place=place)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def do_you_recommend(self):
|
||||||
|
if self == PackageType.MOD:
|
||||||
|
return lazy_gettext(u"Do you recommend this mod?")
|
||||||
|
elif self == PackageType.GAME:
|
||||||
|
return lazy_gettext(u"Do you recommend this game?")
|
||||||
|
elif self == PackageType.TXP:
|
||||||
|
return lazy_gettext(u"Do you recommend this texture pack?")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get(cls, name):
|
def get(cls, name):
|
||||||
try:
|
try:
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<form method="post" action="{{ package.get_url('packages.review') }}" class="card-body">
|
<form method="post" action="{{ package.get_url('packages.review') }}" class="card-body">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<p>
|
<p>
|
||||||
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
|
{{ package.type.do_you_recommend }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
@ -168,7 +168,7 @@
|
|||||||
<form method="post" action="{{ package.get_url('packages.review') }}" class="card-body">
|
<form method="post" action="{{ package.get_url('packages.review') }}" class="card-body">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<p>
|
<p>
|
||||||
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
|
{{ package.type.do_you_recommend }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="btn-toolbar" role="toolbar">
|
<div class="btn-toolbar" role="toolbar">
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>
|
<p>
|
||||||
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
|
{{ package.type.do_you_recommend }}
|
||||||
</p>
|
</p>
|
||||||
{{ render_toggle_field(form.rating, icons={"5":"fa-thumbs-up", "3": "fa-minus", "1":"fa-thumbs-down"}) }}
|
{{ render_toggle_field(form.rating, icons={"5":"fa-thumbs-up", "3": "fa-minus", "1":"fa-thumbs-down"}) }}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<h2 class="mt-0 mb-4">{{ self.title() }}</h2>
|
<h2 class="mt-0 mb-4">{{ self.title() }}</h2>
|
||||||
{% if num == 1 %}
|
{% if num == 1 %}
|
||||||
<p>
|
<p>
|
||||||
{{ _("To provide translations for your %(type)s, you need to create .tr files and upload a new release.", type=package.type.text | lower) }}
|
{{ _("To provide translations for your package, you need to create .tr files and upload a new release.") }}
|
||||||
{{ _("For information on how to do this, see the modding book chapter and lua_api.md") }}
|
{{ _("For information on how to do this, see the modding book chapter and lua_api.md") }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
Reference in New Issue
Block a user