Skip to content

Commit

Permalink
renamed team make to team create globally
Browse files Browse the repository at this point in the history
+ compiled new msgs
  • Loading branch information
JasonLovesDoggo committed Dec 10, 2023
1 parent 38f238a commit adbd303
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 37 deletions.
2 changes: 1 addition & 1 deletion core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .models import *


class TeamMakeForm(forms.ModelForm):
class TeamCreateForm(forms.ModelForm):
class Meta:
widgets = dict(
name=forms.TextInput(attrs={"placeholder": "team name"}),
Expand Down
Binary file modified core/locale/ja_JP/LC_MESSAGES/django.mo
Binary file not shown.
107 changes: 84 additions & 23 deletions core/locale/ja_JP/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-09 22:30-0500\n"
"POT-Creation-Date: 2023-12-10 12:13-0500\n"
"PO-Revision-Date: 2022-12-16 20:24+EST\n"
"Last-Translator: にぃゆい <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -41,23 +41,23 @@ msgstr ""
msgid "ago"
msgstr ""

#: .\core\templates\core\base.html:100
#: .\core\templates\core\base.html:101
msgid "Home"
msgstr "ホーム"

#: .\core\templates\core\base.html:107
#: .\core\templates\core\base.html:108
msgid "Admin"
msgstr "管理"

#: .\core\templates\core\base.html:112
#: .\core\templates\core\base.html:113
msgid "current"
msgstr "最新ヒント"

#: .\core\templates\core\base.html:116 .\core\templates\core\logout.html:6
#: .\core\templates\core\base.html:117 .\core\templates\core\logout.html:6
msgid "Logout"
msgstr "ログアウト"

#: .\core\templates\core\base.html:123
#: .\core\templates\core\base.html:124
msgid "Login"
msgstr ""

Expand Down Expand Up @@ -170,15 +170,30 @@ msgstr ""
"\n"
"チームプレイ:%(team)s"

#: .\core\templates\core\index.html:45 .\core\templates\core\team_join.html:22
#: .\core\templates\core\index.html:42
#, fuzzy
#| msgid "invite members"
msgid "invite more team members"
msgstr "チームに招待"

#: .\core\templates\core\index.html:44
#, fuzzy
#| msgid "make a team"
msgid "leave team"
msgstr "チームを作る"

#: .\core\templates\core\index.html:51 .\core\templates\core\team_join.html:22
msgid "join a team"
msgstr "チームに参加"

#: .\core\templates\core\index.html:48 .\core\templates\core\team_new.html:21
msgid "make a team"
#: .\core\templates\core\index.html:54
#: .\core\templates\core\team_create.html:21
#, fuzzy
#| msgid "make a team"
msgid "create a team"
msgstr "チームを作る"

#: .\core\templates\core\index.html:55
#: .\core\templates\core\index.html:61
msgid ""
"\n"
" no future scavenger hunt is scheduled, please check back later\n"
Expand All @@ -203,24 +218,57 @@ msgstr "次のコードを見つけたよ:"
msgid "change"
msgstr "管理"

#: .\core\templates\core\qr.html:46
#: .\core\templates\core\qr.html:47
msgid "your first hint is:"
msgstr "最初のヒントは:"

#: .\core\templates\core\qr.html:48
#: .\core\templates\core\qr.html:49
msgid "your next hint is:"
msgstr "次のヒントは:"

#: .\core\templates\core\qr.html:71
#: .\core\templates\core\qr.html:72
msgid ""
"Oh ho? What lieth there? Tis the light at the end of the tunnel! <br /> "
"Congratulations valiant scavenger and thank you for playing!"
msgstr ""

#: .\core\templates\core\qr.html:75
#: .\core\templates\core\qr.html:77
msgid "Incorrect QR code, please read your hint again or contact an organizer"
msgstr ""

#: .\core\templates\core\team.html:7 .\core\templates\core\team.html:18
msgid "Team Information"
msgstr ""

#: .\core\templates\core\team.html:20
msgid "Team Name:"
msgstr ""

#: .\core\templates\core\team.html:21
#, fuzzy
#| msgid "Invite Members"
msgid "Team Members:"
msgstr "チームに招待"

#: .\core\templates\core\team.html:22
msgid "Current QR Code:"
msgstr ""

#: .\core\templates\core\team.html:28
msgid "Logic Puzzle Hints:"
msgstr ""

#: .\core\templates\core\team.html:34
msgid "You are not part of any team."
msgstr ""

#: .\core\templates\core\team_create.html:6
#: .\core\templates\core\team_leave.html:6
#, fuzzy
#| msgid "make a team"
msgid "Create a Team"
msgstr "チームを作る"

#: .\core\templates\core\team_invite.html:7
msgid "Invite Members"
msgstr "チームに招待"
Expand Down Expand Up @@ -269,11 +317,13 @@ msgstr "チームの参加コードを入れるか"
msgid "or, scan your team's QR code"
msgstr "チームの二次元コードをスキャンしてにゃ"

#: .\core\templates\core\team_new.html:6
#, fuzzy
#| msgid "make a team"
msgid "Make a Team"
msgstr "チームを作る"
#: .\core\templates\core\team_leave.html:21
msgid "Are you sure you want to leave your team?"
msgstr ""

#: .\core\templates\core\team_leave.html:28
msgid "No"
msgstr ""

#: .\core\utils\actions.py:33
msgid "Set selected users as a Logic Puzzle Setter"
Expand Down Expand Up @@ -337,9 +387,20 @@ msgstr "チーム%(team_name)sに参加したにゃ"
msgid "Team %(team_name)s is full."
msgstr "チーム%(team_name)sはもう満杯だよ"

#: .\core\views\team.py:75
#, python-format
msgid "Made team %(team_name)s"
#: .\core\views\team.py:66
msgid "You are already in a team. Leave your current team to create a new one."
msgstr ""

#: .\core\views\team.py:83
#, fuzzy, python-format
#| msgid "Made team %(team_name)s"
msgid "Created team %(team_name)s"
msgstr "チーム%(team_name)sをつくったよ。"

#: .\core\views\team.py:101
#, fuzzy, python-format
#| msgid "Made team %(team_name)s"
msgid "Left team %(team_name)s"
msgstr "チーム%(team_name)sをつくったよ。"

#~ msgid ""
Expand Down
2 changes: 1 addition & 1 deletion core/templates/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>
<a class="button" href="{% url 'join' %}">{% translate "join a team" %}</a>
</li>
<li>
<a class="button" href="{% url 'team_new' %}">{% translate "make a team" %}</a>
<a class="button" href="{% url 'team_create' %}">{% translate "create a team" %}</a>
</li>
{% endif %}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load static %}

{% block title %}
{% translate "Make a Team" %}
{% translate "Create a Team" %}
{% endblock %}

{% block extracss %}
Expand All @@ -18,9 +18,9 @@
{% block body %}
<div class="team-content">
<div class="team-heading">
{% translate "make a team" %}
{% translate "create a team" %}
</div>
<form action="{% url 'team_new' %}" method="post">
<form action="{% url 'team_create' %}" method="post">
{% csrf_token %}
{{ form }}
<div class="input-padding">
Expand Down
2 changes: 1 addition & 1 deletion core/templates/core/team_leave.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load static %}

{% block title %}
{% translate "Make a Team" %}
{% translate "Create a Team" %}
{% endblock %}

{% block extracss %}
Expand Down
2 changes: 1 addition & 1 deletion core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
path("signal", qr.qr_signal, name="qr_signal"),
path("team", team.team, name="team"),
path("team/join/", team.join, name="join"),
path("team/make/", team.make, name="team_new"),
path("team/create/", team.create, name="team_create"),
path("team/invite", team.invite, name="team_invite"),
path("team/leave", team.leave, name="team_leave"),
path("clues", puzzle.logic_clues, name="logic_clues"),
Expand Down
14 changes: 7 additions & 7 deletions core/views/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.views.decorators.http import require_http_methods

from .qr import team_required, upcoming_hunt_required, block_if_current_hunt
from ..forms import TeamJoinForm, TeamMakeForm
from ..forms import TeamJoinForm, TeamCreateForm
from ..models import Team, Invite, generate_invite_code, Hunt


Expand Down Expand Up @@ -55,15 +55,15 @@ def join(request):
@require_http_methods(["GET", "POST"])
@block_if_current_hunt
@upcoming_hunt_required
def make(request):
def create(request):
if request.method == "POST":
form = TeamMakeForm(request.POST)
form = TeamCreateForm(request.POST)
if form.is_valid():
if request.user.in_team:
messages.error(
request,
_(
"You are already in a team. Leave your current team to make a new one."
"You are already in a team. Leave your current team to create a new one."
),
)
return redirect(reverse("team_leave"))
Expand All @@ -80,13 +80,13 @@ def make(request):
)
messages.success(
request,
_("Made team %(team_name)s")
_("Created team %(team_name)s")
% dict(team_name=form.cleaned_data["name"]),
)
return redirect(reverse("index"))
else:
form = TeamMakeForm()
return render(request, "core/team_new.html", dict(form=form))
form = TeamCreateForm()
return render(request, "core/team_create.html", dict(form=form))


@login_required
Expand Down

1 comment on commit adbd303

@JasonLovesDoggo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh lmao

Please sign in to comment.