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

Add translation support #26

Merged
merged 12 commits into from
Feb 25, 2020
Merged

Add translation support #26

merged 12 commits into from
Feb 25, 2020

Conversation

jean
Copy link
Contributor

@jean jean commented Feb 9, 2020

No description provided.

@jean jean self-assigned this Feb 9, 2020
Copy link
Contributor

@georgically georgically left a 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. : )

---


# 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.
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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?

Copy link
Contributor Author

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.

* 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.
Copy link
Contributor

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.


* 2020: We will be doubling in size again!
* 2019: will be bigger and better
Copy link
Contributor

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'
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

@bluenex bluenex left a 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.

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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")


## About Python
## __*About Python*__
Copy link
Contributor

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?

Copy link
Contributor Author

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.


* 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*__
Copy link
Contributor

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)?

@@ -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*__
Copy link
Contributor

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)?

Comment on lines 19 to 20
* \#1 learning language in USA universities
* \#3 most popular developer language in the world
Copy link
Contributor

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 (".")?

Comment on lines 25 to 26
* PyCon (US) One of the top developer conferences
* Established in 2003
Copy link
Contributor

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?

@@ -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.
Copy link
Contributor

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"

Comment on lines +23 to +30
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)
Copy link
Contributor

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.

Copy link
Contributor Author

@jean jean Feb 11, 2020

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

@jean
Copy link
Contributor Author

jean commented Feb 11, 2020

By the way, this work prompted a PR upstream: Pelican-Elegant/elegant#586

@jean jean merged commit d7bdadb into PyConTH:master Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants