-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add translation support #26
Conversation
Can't mix translated and un-translated pages
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.
Looks great overall except a few points I've commented. : )
content/pages/about-en.md
Outdated
--- | ||
|
||
|
||
# About | ||
|
||
PyCon Thailand is a community effort driven by the members of the Python Community in Bangkok and the entire organising team are all volunteers. PyCon thailand is run as a Non-profit event and any money made from ticket sales or sponsorship is put back into this or future events to grow the community. | ||
|
||
PyCon Thailand sets itself apart from other many other developer events in Thailand by being both non-profit and by having an affordable ticket price. The event can be a professional conference that provides valuable training and networking to companies. PyCon Thailand also provides financial support to the non-professional Python community of Thailand. | ||
PyCon Thailand sets itself apart from other many other developer events in Thailand by being both non-profit and by having an affordable ticket price. The event can be a professional conference that provides valuable training and networking to companies. Pycon Thailand also provides financial support to non-professinal Python community of Thailand. |
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.
PyCon Thailand also provides financial support to the non-professional Python community of Thailand.
- Pycon ("c"needs to be captalized)
- the word "the"should not be deleted
- non-professinal (spelling) corrected
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.
PyCon Thailand sets itself apart from other many other developer events in Thailand by being both non-profit and by having an affordable ticket price. The event can be a professional conference that provides valuable training and networking to companies. Pycon Thailand also provides financial support to non-professinal Python community of Thailand. | |
PyCon Thailand sets itself apart from many other developer events in Thailand by being both non-profit and by having an affordable ticket price. The event can be a professional conference that provides valuable training and networking to companies. Pycon Thailand also provides financial support to non-professinal Python community of Thailand. |
Is that other duplicated?
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.
Augh, please ignore this file, it shouldn't really be in git at all.
The content comes from the Notion page, edit it there.
content/pages/about-en.md
Outdated
* 2019: will be bigger and better | ||
* 2018: Sold out event for over 200 attendees. See [Archive](https://2018.th.pycon.org/) and last year's talks on youtube. | ||
* 2018: Sold out event for over 200 attendees. See Archive and last years talks on youtube. |
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.
2018: Sold out event for over 200 attendees. See Archive and 2018's talks on YouTube.
content/pages/about-en.md
Outdated
|
||
* 2020: We will be doubling in size again! | ||
* 2019: will be bigger and better |
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.
2019 : Over 250 tickets sold! Tickets sold out a week before event.
pelicanconf.py
Outdated
@@ -4,14 +4,19 @@ | |||
|
|||
AUTHOR = 'Tech WG' | |||
SITENAME = 'PyCon Thailand 2020' | |||
SITEURL = '' | |||
SITEURL = 'https://th.pycon.org' |
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.
Remove this as it will make using local server impossible. SITEURL is already defined in publishconf
for production version.
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.
OK, switching netlify build to use that.
Content comes from Notion. The `about-en.md` page got picked up as a rename of the sample `about.md` page, but it's just confusing.
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 have several comments on typos and string formatting.
content/pages/about-en.md
Outdated
date: 2019-10-04 12:47:00 | ||
summary: | ||
slug: about | ||
lang: en | ||
--- | ||
|
||
|
||
# About | ||
|
||
PyCon Thailand is a community effort driven by the members of the Python Community in Bangkok and the entire organising team are all volunteers. PyCon thailand is run as a Non-profit event and any money made from ticket sales or sponsorship is put back into this or future events to grow the community. |
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.
PyCon Thailand is a community effort driven by the members of the Python Community in Bangkok and the entire organising team are all volunteers. PyCon thailand is run as a Non-profit event and any money made from ticket sales or sponsorship is put back into this or future events to grow the community. | |
PyCon Thailand is a community effort driven by the members of the Python Community in Bangkok and the entire organising team are all volunteers. PyCon Thailand is run as a non-profit event and any money made from ticket sales or sponsorship is put back into this or future events to grow the community. |
- Thailand (capitalized "T")
- non-profit (lowercase "n")
content/pages/about-en.md
Outdated
|
||
## About Python | ||
## __*About Python*__ |
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.
is __*
for both italic and bold? As a header, shouldn't only italic be enough?
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.
That's the output of Notion.
content/pages/about-en.md
Outdated
|
||
* Python is an open source programming language. | ||
* \#1 learning language in USA universities | ||
* \#3 most popular developer language in the world | ||
* Used by organisations such as Google, Wikipedia, CERN, NASA, Facebook, Instagram and Spotify. | ||
* Popularly used for Web Development, Artificial Intelligence, DevOps, Scientific Research and Data Analytics. | ||
|
||
## About PyCon | ||
## __*About PyCon*__ |
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.
Shouldn't this header have surrounded space (both on top and bottom)?
content/pages/about-en.md
Outdated
@@ -28,16 +29,14 @@ PyCon Thailand sets itself apart from other many other developer events in Thail | |||
* Hosted in 45 different countries. | |||
* Supported and attended by the world’s top technology organisations. | |||
* Key topics include Data Analytics, Machine Learning, Science, Robotics, Web Development, DevOps, Internet of Things, Gaming and Databases. | |||
|
|||
## The People | |||
## __*The People*__ |
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.
Shouldn't this header have surrounded space (both on top and bottom)?
content/pages/about-en.md
Outdated
* \#1 learning language in USA universities | ||
* \#3 most popular developer language in the world |
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.
Should there be a full stop (".")?
content/pages/about-en.md
Outdated
* PyCon (US) One of the top developer conferences | ||
* Established in 2003 |
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.
Should there be a full stop?
content/pages/about-en.md
Outdated
@@ -28,16 +29,14 @@ PyCon Thailand sets itself apart from other many other developer events in Thail | |||
* Hosted in 45 different countries. | |||
* Supported and attended by the world’s top technology organisations. | |||
* Key topics include Data Analytics, Machine Learning, Science, Robotics, Web Development, DevOps, Internet of Things, Gaming and Databases. | |||
|
|||
## The People | |||
## __*The People*__ | |||
|
|||
Pycon attracts people from all over the world. Pycon is one of the largest open source language developer conference in Thailand. In Pycon 2018, 83% attendees are from Thailand and 17% of the international attendees are well represented by South-east Asian countries. Many people traveled from the USA and all over Europe to attend too. This is because Thailand is also a well-known for it's good food, culture and climate. Attendees are entrepreneurs, developers, educators, engineers and young aspiring Python users. What they all have in common is a passion for the programming language, Python. They come to discover, meet people, learn stuff, have fun, and be inspired. |
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.
... Thailand is also a well-known for it's good food, ...
- "its good food"
text = """--- | ||
title: %s | ||
date: %s | ||
description: | ||
summary: %s | ||
slug: %s | ||
lang: %s | ||
--- | ||
""" % (post.title, datetime.datetime.now()) | ||
# Handle Title | ||
text = text + '\n\n' + '# ' + post.title + '\n\n' | ||
for content in post.children: | ||
# Handles H1 | ||
if content.type == 'header': | ||
text = text + '# ' + content.title + '\n\n' | ||
# Handles H2 | ||
elif content.type == 'sub_header': | ||
text = text + '## ' + content.title + '\n\n' | ||
# Handles H3 | ||
elif content.type == 'sub_sub_header': | ||
text = text + '### ' + content.title + '\n\n' | ||
# Handles Code Blocks | ||
elif content.type == 'code': | ||
text = text + '```\n' + content.title + '\n```\n\n' | ||
# Handles Images | ||
elif content.type == 'image': | ||
text = text + '![' + content.id + '](' + content.source + ')\n\n' | ||
# Handles Bullets | ||
elif content.type == 'bulleted_list': | ||
text = text + '* ' + content.title + '\n' | ||
# Handles Dividers | ||
elif content.type == 'divider': | ||
text = text + '---' + '\n\n' | ||
# Handles Basic Text, Links, Single Line Code | ||
elif content.type == 'text': | ||
text = text + content.title + '\n\n' | ||
else: | ||
print("Ignoring unknown block", content) | ||
""" % (page.title, page.created, page.summary, page.slug, page.language) |
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.
This can be fstring too if you like. IMO, it would be a bit cleaner as there is no chain anymore.
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.
It looks like Netlify only supports 3.6 which doesn't have fstrings yet.
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.
From PEP 498, the fstring is working since 3.6 isn't it?
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.
All I know is that it blew up when I pushed it ... I might have fumbled something.
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.
Hmm... what's the status of this now by the way?
By the way, this work prompted a PR upstream: Pelican-Elegant/elegant#586 |
No description provided.