Skip to content
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

💻 Front page start learning/teaching #5200

Merged
merged 56 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ad67b99
new buttons
Annelein Mar 1, 2024
4e8dafa
translations and correct link
Annelein Mar 1, 2024
ab9d6fc
tab
Annelein Mar 1, 2024
7e0d991
Translated using Weblate (French)
nifouprog Mar 8, 2024
53179b7
Translated using Weblate (Bulgarian)
weblate Mar 8, 2024
eb48d8d
Translated using Weblate (German)
weblate Mar 8, 2024
84ff19a
Translated using Weblate (Greek)
weblate Mar 8, 2024
bd015f7
Translated using Weblate (Spanish)
weblate Mar 8, 2024
ebee88d
Translated using Weblate (Hungarian)
weblate Mar 8, 2024
4c0203e
Translated using Weblate (Indonesian)
weblate Mar 8, 2024
ba24891
Translated using Weblate (Dutch)
weblate Mar 8, 2024
2169903
Translated using Weblate (Portuguese (Portugal))
weblate Mar 8, 2024
dea7fee
Translated using Weblate (Portuguese (Brazil))
weblate Mar 8, 2024
ceba7bd
Translated using Weblate (Bengali)
weblate Mar 8, 2024
c9efac6
Translated using Weblate (Czech)
weblate Mar 8, 2024
9b7bc35
Translated using Weblate (Hindi)
weblate Mar 8, 2024
538003b
Translated using Weblate (Swahili)
weblate Mar 8, 2024
4a2c27c
Translated using Weblate (Italian)
weblate Mar 8, 2024
93dfe9a
Translated using Weblate (Arabic)
weblate Mar 8, 2024
5d848f5
Translated using Weblate (Frisian)
weblate Mar 8, 2024
739979a
Translated using Weblate (Chinese (Simplified))
weblate Mar 8, 2024
6a9fdc8
Translated using Weblate (Turkish)
weblate Mar 8, 2024
fb5f520
Translated using Weblate (Norwegian Bokmål)
weblate Mar 8, 2024
9a8b11d
Translated using Weblate (Polish)
weblate Mar 8, 2024
2917add
Translated using Weblate (Persian)
weblate Mar 8, 2024
68f4f44
Translated using Weblate (Russian)
weblate Mar 8, 2024
de90f89
Translated using Weblate (Esperanto)
weblate Mar 8, 2024
f4a5d77
Translated using Weblate (Estonian)
weblate Mar 8, 2024
e916ad0
Translated using Weblate (Japanese)
weblate Mar 8, 2024
2193e32
Translated using Weblate (Hebrew)
weblate Mar 8, 2024
b45d2cd
Translated using Weblate (Swedish)
weblate Mar 8, 2024
6f71c0f
Translated using Weblate (Korean)
weblate Mar 8, 2024
8381066
Translated using Weblate (Tswana)
weblate Mar 8, 2024
fe316de
Translated using Weblate (Urdu)
weblate Mar 8, 2024
8513f14
Translated using Weblate (Thai)
weblate Mar 8, 2024
9679e46
Translated using Weblate (Albanian)
weblate Mar 8, 2024
e9f247b
Translated using Weblate (Ukrainian)
weblate Mar 8, 2024
ba22314
Translated using Weblate (Punjabi (Pakistan))
weblate Mar 8, 2024
402f94b
Translated using Weblate (Vietnamese)
weblate Mar 8, 2024
6f3d228
Translated using Weblate (Tagalog)
weblate Mar 8, 2024
93aafa2
Translated using Weblate (Finnish)
weblate Mar 8, 2024
a4098cf
Translated using Weblate (Telugu)
weblate Mar 8, 2024
b4a8403
Translated using Weblate (Chinese (Traditional))
weblate Mar 8, 2024
a9b0947
Translated using Weblate (Catalan)
weblate Mar 8, 2024
0a44251
Translated using Weblate (Romanian)
weblate Mar 8, 2024
3ca7cb4
Translated using Weblate (Danish)
weblate Mar 8, 2024
ef13cc5
Translated using Weblate (Serbian)
weblate Mar 8, 2024
11cfaf9
Translated using Weblate (Papiamento)
weblate Mar 8, 2024
eb6b4a8
Merge remote-tracking branch 'weblate/main'
Felienne Mar 8, 2024
33339f5
Merge remote-tracking branch 'origin/main' into front-page
Felienne Mar 9, 2024
5d0da9d
Merge branch 'main' of https://github.com/hedyorg/hedy
Felienne Mar 9, 2024
998ee07
Merge branch 'main' into front-page
Felienne Mar 9, 2024
cc06217
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 9, 2024
435a4f9
fix po files
Felienne Mar 9, 2024
50126d3
Merge branch 'front-page' of https://github.com/hedyorg/hedy into fro…
Felienne Mar 9, 2024
1f1eb61
dutch translations
Felienne Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,8 +2039,10 @@ def main_page():
if os.path.isfile(f'static/images/hero-graphic/hero-graphic-{g.lang}.png'):
custom_logo = True

user = current_user()

return render_template('main-page.html', page_title=gettext('title_start'), custom_logo=custom_logo,
current_page='start', content=content)
current_page='start', content=content, user=user)


@app.route('/subscribe')
Expand Down
8 changes: 4 additions & 4 deletions content/adventures/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1359,10 +1359,10 @@ adventures:
story_text: Už i naše seznamy mají vlastní závorky! Budeme je psát do hranatých závorek a jejich jednotlivé položky do jednoduchých uvozovek ('), které už známe.
example_code: |4

```
ovoce = ['jablko', 'banán', 'třešně']
print ovoce
```
```
ovoce = ['jablko', 'banán', 'třešně']
print ovoce
```
17:
story_text: |-
Nyní trochu změníme odsazení. Pokaždé, když potřebujeme odsazení, je třeba zapsat znak `:` na řádku před tímto odsazením.
Expand Down
1 change: 1 addition & 0 deletions content/adventures/da.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4010,6 +4010,7 @@ adventures:
The Drunken Sailor is also quickly made in this level. You only need 8 lines for the entire song, check it out!

### Exercise

Complete the Old MacDonald song by setting the variable `animal` to `animals[i]` and `sound` to `sounds[i]`.
example_code: "```\nalle_dyr = ['gris', 'hund', 'ko']\nlyde = ['øh', 'vuf', 'muh']\n{for} i {in} {range} 1 {to} 3\n dyr = alle_dyr[i]\n lyd = lyde[i]\n {print} 'Jens Hansen havde en bondegård'\n {print} 'ih ah ih ah oh!'\n {print} 'og på den gård der var en ' dyr\n {print}\
\ 'ih ah ih ah oh!'\n {print} 'Der var ' lyd lyd' her'\n {print} 'og ' lyd lyd' der'\n {print} lyde ' her'\n {print} lyde ' der'\n {print} 'alle steder ' lyde lyde\n```\n\n```\nlinjer = ['Hvad skal vi gøre med den fulde sømand', 'Smid ham i brummen til han vågner', 'Han\
Expand Down
4 changes: 2 additions & 2 deletions content/adventures/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,8 @@ adventures:
levels:
4:
story_text: |
C'est le moment d'apprendre une nouvelle commande ! Avec `{clear}` tu peux effacer tout le texte de l'écran d'affichage. De cette manière, tu peux éviter que ton écran ne soit trop rempli de texte.
Attention ! Quand tu utilises une commande `{clear}`, rappelle-toi d'utiliser un `{sleep}` juste avant. Sinon Hedy effacera ton écran sans te laisser le temps de le lire !
C'est le moment d'apprendre une nouvelle commande! Avec `{clear}` tu peux effacer tout le texte de l'écran d'affichage. De cette manière, tu peux éviter que ton écran ne soit trop rempli de texte.
Attention! Quand tu utilises une commande `{clear}`, il se peut que tu aies besoin d'utiliser un `{sleep}` juste avant. Sinon Hedy effacera ton écran sans te laisser le temps de le lire comme tu peux le voir dans cet exemple !
example_code: |
```
{print} "3"
Expand Down
11 changes: 7 additions & 4 deletions messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-03-08 18:45+0100\n"
"POT-Creation-Date: 2024-03-01 11:10+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -1490,6 +1490,9 @@ msgstr ""
msgid "start_hedy_tutorial"
msgstr ""

msgid "start_learning"
msgstr ""

msgid "start_programming"
msgstr ""

Expand All @@ -1502,6 +1505,9 @@ msgstr ""
msgid "start_teacher_tutorial"
msgstr ""

msgid "start_teaching"
msgstr ""

msgid "step_title"
msgstr ""

Expand Down Expand Up @@ -1715,9 +1721,6 @@ msgstr ""
msgid "translator"
msgstr ""

msgid "try_it"
msgstr ""

msgid "tutorial"
msgstr ""

Expand Down
7 changes: 5 additions & 2 deletions templates/main-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
<div class="text-xl flex flex-col">
<div class="bg-blue-200 mt-8 mb-8 border-b-8 border-blue-300">
<div class="copy-container px-8 py-8 md:py-16 md:px-16 mb-8 flex flex-col gap-16 md:flex-row justify-between items-stretch">
<div class="flex flex-col gap-2">
<div class="flex flex-col gap-4">
<h1 class="font-bold font-slab text-sky-600 text-6xl tracking-wide">{{_('main_title')}}</h1>
<h2 class="py-0 my-0 font-sans font-light text-black tracking-wide">{{_('main_subtitle')}}</h2>
<button id="tryitbutton" class="green-btn text-white px-8 py-4" onclick="window.location.href='/hedy'">{{_('try_it')}}</button>
<div class="flex flex-row gap-4 min-w-full">
<button id="try_learning_button" class="green-btn text-white w-64 py-4" onclick="window.location.href='/hedy'">{{_('start_learning')}}</button>
<button id="try_teaching_button" class="white-btn text-blue-500 w-64 py-4" onclick="window.location.href={% if not user.is_teacher %}'signup?teacher=true'{% else %}'for-teachers'{% endif %}">{{_('start_teaching')}}</button>
</div>
</div>
{# image for large screens #}
<div class="hidden md:block overflow-visible relative flex-none" style="width: 500px">
Expand Down
3 changes: 2 additions & 1 deletion tests/cypress/e2e/home_page/buttons/try_it_button.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { goToHome } from "../../tools/navigation/nav";
describe('Try it button', () => {
it('passes', () => {
goToHome();
cy.get('#tryitbutton').should("be.not.disabled").should("be.visible");
cy.get('#try_learning_button').should("be.not.disabled").should("be.visible");
cy.get('#try_teaching_button').should("be.not.disabled").should("be.visible");
})
})
30 changes: 14 additions & 16 deletions translations/ar/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-03-08 18:45+0100\n"
"PO-Revision-Date: 2024-03-03 07:14+0000\n"
"POT-Creation-Date: 2024-03-01 11:10+0100\n"
"PO-Revision-Date: 2024-02-19 01:12+0000\n"
"Last-Translator: Snoring Parrot <[email protected]>\n"
"Language: ar\n"
"Language-Team: ar <[email protected]>\n"
Expand Down Expand Up @@ -78,7 +78,7 @@ msgstr "يبدو أنك نسيت استخدام أمر برمجي في السط
msgid "Missing Inner Command"
msgstr "يبدو أنك نسيت استخدام أمر برمجي مع الجملة {command} التي استعملتها في السطر رقم {line_number}."

#, fuzzy

msgid "Missing Square Brackets"
msgstr "It looks like you forgot to use square brackets [] around the list you were creating on line {line_number}."

Expand Down Expand Up @@ -187,11 +187,9 @@ msgstr "مغامرة"
msgid "adventure_cloned"
msgstr "المغامرة قد نُسخت"

msgid "adventure_code_button"
msgstr "هذه الكبسة تمكنك من إضافة كلمة مفتاحية بأي مكان في النص."

msgid "adventure_codeblock_button"
msgstr "استخدم هذه الكبسة لكتابة مجموعة كود لكي يستخدمها الطلاب. ملاحظة: لكي تخرج من المجموعة هذه, إنقر على <kbd>Enter</kbd> 3 مرات وأنت في نهاية الكود."
msgstr ""

msgid "adventure_duplicate"
msgstr "لديك بالفعل مغامرة بنفس هذا الإسم."
Expand All @@ -203,7 +201,7 @@ msgid "adventure_exp_3"
msgstr "يمكنك استخدام زر \"معاينة\" لعرض نسخة مصممة من مغامرتك. لعرض المغامرة على صفحة مخصصة ، اختر \"عرض\" من صفحة المعلمين."

msgid "adventure_exp_classes"
msgstr "المغامرة هذه مُستخدمة في الصفوف التالية"
msgstr ""

msgid "adventure_id_invalid"
msgstr "رمز المغامرة هذا غير صالح."
Expand Down Expand Up @@ -1685,6 +1683,9 @@ msgstr "علامة النجمة"
msgid "start_hedy_tutorial"
msgstr "بدء الدليل التوجيهي"

msgid "start_learning"
msgstr ""

msgid "start_programming"
msgstr "ابدأ البرمجة"

Expand All @@ -1698,6 +1699,9 @@ msgstr "بدء الفحص السريع"
msgid "start_teacher_tutorial"
msgstr "بدء الدليل التوجيهي للمعلم"

msgid "start_teaching"
msgstr ""

msgid "step_title"
msgstr "المهمة"

Expand Down Expand Up @@ -1945,9 +1949,6 @@ msgstr "Translating Hedy"
msgid "translator"
msgstr "Translator"

msgid "try_it"
msgstr "جرب ذلك"

#, fuzzy
msgid "tutorial"
msgstr "Tutorial"
Expand Down Expand Up @@ -2225,18 +2226,15 @@ msgstr "Your program"
#~ msgid "hello_world"
#~ msgstr "Hello world!"

#~ msgid "hide_parsons"
#~ msgstr "Hide parsons"

#~ msgid "hide_quiz"
#~ msgstr "نهاية الفحص السريع"

#~ msgid "share_confirm"
#~ msgstr "هل أنت متأكد من أنك تريد جعل البرنامج عاماً/علنياً؟"

#~ msgid "share_success_detail"
#~ msgstr "تم مشاركة البرنامج بنجاح."

#~ msgid "try_it"
#~ msgstr "جرب ذلك"

#~ msgid "unshare_confirm"
#~ msgstr "هل أنت متأكد من أنك تريد جعل البرنامج خاصاً/سرّياً؟"

Expand Down
44 changes: 24 additions & 20 deletions translations/bg/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-03-08 18:45+0100\n"
"PO-Revision-Date: 2024-03-07 13:40+0000\n"
"POT-Creation-Date: 2024-03-01 11:10+0100\n"
"PO-Revision-Date: 2024-02-26 20:10+0000\n"
"Last-Translator: Prefill add-on <[email protected]>\n"
"Language: bg\n"
"Language-Team: bg <[email protected]>\n"
Expand Down Expand Up @@ -85,7 +85,7 @@ msgstr "It looks like you forgot to use a command on line {line_number}."
msgid "Missing Inner Command"
msgstr "It looks like you forgot to use a command with the {command} statement you used on line {line_number}."

#, fuzzy

msgid "Missing Square Brackets"
msgstr "It looks like you forgot to use square brackets [] around the list you were creating on line {line_number}."

Expand Down Expand Up @@ -206,7 +206,8 @@ msgstr "Авантюра"
msgid "adventure_cloned"
msgstr "Adventure is cloned"

#, fuzzy


msgid "adventure_code_button"
msgstr "This button allows you to add a keyword within any text you write."

Expand All @@ -226,7 +227,7 @@ msgstr "You didn't enter an adventure name!"
msgid "adventure_exp_3"
msgstr "You can use the \"preview\" button to view a styled version of your adventure. To view the adventure on a dedicated page, select \"view\" from the teachers page."

#, fuzzy

msgid "adventure_exp_classes"
msgstr "Your adventure is used within the following classes"

Expand Down Expand Up @@ -1915,6 +1916,9 @@ msgstr "звезда"
msgid "start_hedy_tutorial"
msgstr "Start hedy tutorial"

msgid "start_learning"
msgstr ""

#, fuzzy
msgid "start_programming"
msgstr "Directly start programming"
Expand All @@ -1930,6 +1934,9 @@ msgstr "Започни теста"
msgid "start_teacher_tutorial"
msgstr "Start teacher tutorial"

msgid "start_teaching"
msgstr ""

msgid "step_title"
msgstr "Задача"

Expand Down Expand Up @@ -2207,9 +2214,6 @@ msgstr "Translating Hedy"
msgid "translator"
msgstr "Translator"

msgid "try_it"
msgstr "Опитай"

#, fuzzy
msgid "tutorial"
msgstr "Tutorial"
Expand Down Expand Up @@ -2497,27 +2501,27 @@ msgstr "Your program"
#~ msgid "adventures"
#~ msgstr "Available Adventures"

#~ msgid "hide_parsons"
#~ msgstr "Hide parsons"

#~ msgid "hide_quiz"
#~ msgstr "Hide quiz"

#~ msgid "adventure_exp_1"
#~ msgstr "Type your adventure of choice on the right-hand side. After creating your adventure you can include it in one of your classes under \"customizations\". If you want to include a command in your adventure please use code anchors like this:"

#~ msgid "hello_world"
#~ msgstr "Hello world!"

#~ msgid "share_confirm"
#~ msgstr "Are you sure you want to make the program public?"

#~ msgid "share_success_detail"
#~ msgstr "Program shared successfully."

#~ msgid "try_it"
#~ msgstr "Опитай"

#~ msgid "unshare_confirm"
#~ msgstr "Are you sure you want to make the program private?"

#~ msgid "unshare_success_detail"
#~ msgstr "Program unshared successfully."

#~ msgid "adventure_exp_1"
#~ msgstr "Type your adventure of choice on the right-hand side. After creating your adventure you can include it in one of your classes under \"customizations\". If you want to include a command in your adventure please use code anchors like this:"

#~ msgid "hello_world"
#~ msgstr "Hello world!"

#~ msgid "adventure_exp_2"
#~ msgstr "If you want to show actual code snippets, for example to give student a template or example of the code. Please use pre anchors like this:"

Loading
Loading