Transcript: Translations - Andrew Knight
Hello and welcome to another episode of Django Chat, a weekly podcast on the Django Web Framework.
I'm Will Vincent joined by Carlton Gibson.
Hi, Carlton.
Hello, Will.
And this week we're very pleased to have Andrew Knight join us to talk about translations.
Hi Andy.
Hey, thanks for having me.
I'm glad to be here.
Thank you for coming on.
Uh there's a lot of things we want to talk to you about.
Uh the big one is translations, but perhaps we can start with your background, how'd you get into programming and um in your day job, which is also quite interesting.
Sure, cool.
So man, I first started programming when I was in high school.
Ninth grade, I went to Parkville High School in Baltimore, Maryland, Center for Math Science and Computer Science.
And as part of joining that special program, you had to get the TI83 Plus Graphing Calculator.
And so here I am, I think, I'm gonna be doing math, right?
Because I've been told I'm good at math and I don't really know what's what the world is like.
And within the first two weeks of ninth grade in my intro to computer science course for programming math formulas on the calculator.
And I thought this was the coolest thing ever.
And so I became addicted.
I just kept making more and more formulas.
I went to the back of my math textbook, I put in all the formulas I could, then I started making games on the calculator, then I started doing graphics things.
I mean, this is you know a TID3 plus, it's nothing sophisticated.
But then um, thankfully, because my high school had computer science courses, in 10th grade I learned to program Java, and then in 11th grade I took the AP exam and the rest was history.
I went to RIT, got my degree in computer science, and I've just loved doing it ever since.
So that's how I got started.
Well, that's fantastic.
You had it yeah, in high school.
That's still quite unusual in the States.
Um I recalled the graphing calculators in math class.
I think I'm a bit older than you are, but I think it was a TI-82 I had, and when I could download not just Tetris was cool, but I was able to get Super Mario Brothers on there.
And that felt so I wasn't even trying to do formulas, I was just playing games.
But that was that was quite fun.
Um so you came out and then um what was your job cycle up until now?
My goodness.
So I've or when I went to school at RIT, they require every student to do internships.
It's you don't graduate unless you do internships.
It's pretty cool.
And so that's how I landed in North Carolina.
I've been in the triangle area for permanently for the past decade.
I've worked at IBM, then NetApp, then oh gosh, there's too many.
Um MaxPoint Interactive, which got bought out by Valassus, then Lexus Nexus, the uh legal software.
Yeah.
And today, for the past almost two years, I'm working at a company called Precision Lender, which recently got acquired by Q2 Software.
Uh in my day-to-day job, I am a software engineer in test.
So I focus heavily on testing, automation, better processes, team collaboration.
I like to tell people when they ask, well, what is a software engineer in test?
I develop solutions to testing problems.
So, hey, um, we we do nothing but manual testing solution.
Let's try to automate some of those tests.
Problem, hey, we're we're struggling to figure out what should be developed and what should be tested, and we don't have these specs.
Okay, let's do some example mapping and let's do some three amigo sessions and actually come together as a team and plan before we code that kind of stuff.
I guess two questions come to mind for me.
The first is which um what technologies have you been using?
I are you able to use Django, or it sounds like maybe not Django for these.
So, yeah, in my it's great you asked that question.
In my J job, I'm not using Django, I'm not even using Python.
Uh PrecisionLender is a Microsoft shop.
So my testing and automation solution is developed in.NET C sharp.
Um, the the data scientists at Precision Lender use Python.
That side is all, you know.
In fact, they they've even done a an internal side project where they're using a Django server to do some cool metadata stuff.
But as as far as me, all my Python and Django is kind of moonlighting.
And how long have you been doing the testing angle?
Is that just at this most recent job, or have you been testing tracks since you came out of school?
I first touched testing and automation in 2007 with my first internship at IBM.
But I I came back to it like you know, full-time, you know, never gone back since about 2011.
That's when I got my job at NetApp because they hired me on a QA team specifically because oh, he's the new college grad, he's got all the programming skills.
We'll just make him do all the scripting.
That that was basically the attitude.
And so I spent four years at NetApp and I basically had to rewrite their the team's uh automation solution because it was it was rough.
And yeah, so that's that's where
I've been.
Now that you're a relative graybeard, well, how does that differ?
Sorry, Carlton.
Well, I was gonna just say that aren't all automation solutions kind of gnarly in in exactly that way.
Oh, so yeah, I mean I've I've had the pleasure of helping several companies, several teams, I've done my own consulting.
And test automation code, I I hate to say this, man, it's some scary stuff because a lot of people don't treat it like regular quote-unquote software, even though it is.
And so a lot of best practices get jettisoned very quickly.
People have this attitude that it's just writing test scripts, it's versus you know building a software stack and a solution that has to be maintainable, that has its own unique challenges.
It's it's a domain, just like web development or microservices.
Test automation is a special domain, and so you need to have a good expertise with it, like anything else.
So, what does your testing look like within your side project Django apps?
What sort of setup do you like to do?
Actually, with with my Django apps, my Django.
I do testing.
Well, because my Django apps that I've developed are actually pretty small, like uh I I can talk about them a little bit later, but they are pretty small.
So I I don't do a lot of front-end UI testing with them.
Because honestly, the Django apps I've made, the front end is just the admin, which is beautiful because it just gives you the front end that you that I needed for my purposes.
I'm like, yeah, yeah.
And that has UI testing as part of the framework.
So exactly, exactly.
So it's like I'm not gonna repeat history there.
But the testing that I do do, I've done um a lot with the Django test client.
I gotta say, that Django test client is lit.
It gives you so much cool stuff.
And so I've done like unit testing, I've done basic database testing, you know, setting up a test database and flowing it away.
Um I've done, oh gosh, what else?
Yeah, just basic utility function testing.
I've I've tied it in with unit test, I've tied it in with PyTest, PyTest is lit, love PyTest.
So yes.
Yeah, that's what I was gonna ask.
Do you use primarily PyTest or do you do a mixture?
I strongly, strongly advocate for PyTest.
I believe very strongly that PyTest is a far superior framework than unit test.
The one advantage unit test has, I think, well, like okay, maybe two.
Two advantages unit test has.
First of all, it's in the standard library, so you don't need to do a pip install to get it.
Secondly, because it is in the traditional X unit format, people coming from other languages like Java and C sharp and whatever, they are immediately more familiar with unit test style tests.
Now that doesn't make it better, it just makes it easier for some people to come in.
But not just I find it's not just people who are familiar with that.
I think beginners find um the way PyTest deals with fixtures difficult, and they create some sort of giant conf test file in the root of their test directory, and it's got all the fixtures in, and it's it's it's spaghetti, and it's difficult, right?
And it's what I find unit test test cases, they're really nice because they make you put the fixtures in the setup, in the in the in it's scope automatically scope just to that class.
And I I you know, as you come to as you come to use PyTest more, you learn, ah, but I can just create a fixture in the my test class so I'm grouping everything, and you can do the same thing, but it's not as automatic, I would say, with PyTest.
It's there's not a pattern dictated to you.
Yeah.
I I could see that.
But I yeah, Py test goes.
Yeah, I mean, uh I find that the fixtures are far more flexible and reuseful than setup and cleanup methods.
Um I find that the code is a lot cleaner when you're done with it.
Um and the the other thing I absolutely love about PyTest are the plugins.
Like you you can just choose from a whole bunch of things.
You want code coverage, boom.
You want reports, boom.
You want BDD with the same thing, boom.
Oh, you you want something that's not in there?
Make it yourself.
You know, it's it's I think like I've I've dealt with tons of these test frameworks across all sorts of languages.
Right now, today, my opinion is PyTest is the best framework for testing in any language today.
Super.
And I'll I'll stand by that.
What what would you change about PyTest, just to like round out this conversation?
Are there because I've heard or for you, what areas would you change if you could about it?
What would I change about PyTest?
Especially given that you you have such a broad experience of other testing you know, ways outside of the Python ecosystem.
That's a great question.
I've never considered that.
Um I'm not sure if there's much I would need to change in PyTest simply because you do have that plugin architecture where if you want to change something, you can.
Um maybe some some quality of life things like uh uh making it easier.
Well no, never mind.
That that's covered by tags.
Um some of the naming of things, like uh parametrize is is British English, not English or American English.
Yeah, stuff like that.
Um English English, you nearly said that.
Yeah, sorry, yeah.
I know, I know.
Um I don't know.
I always thought the name conf test.py was a little bit weird, you know.
I I do like how that one though can can apply to different directory levels, which is nice.
Yeah, that's super.
That's really super.
Yeah, yeah.
So there like the the nice thing about PyTest is it's it's comprehensive and flexible, yet it still feels minimal.
So I'm yeah, I'm not sure there would be much I would want to change.
At least not right now.
Maybe I'll think about it and you know tomorrow I'll wake up and be like, oh, there's this thing, but
yeah, I think beyond the syntax, it's the f it's the fixture nature of PyTest that trips up uh beginners in my experience when they want to make that transition, just as you said, trying to figure out how to how to use them properly, the fact that you don't have to have one massive fixture.
I mean, even just using fixtures, the concept of fixtures of someone's learning on their own is a foreign concept.
So I I agree with your, you know, that's the big leap for people when they jump to Py test.
And and you know, for me, I I'm work at some point I'm gonna release a course on just specifically Django testing, and that's one of the questions I'm asking myself is what's that structure?
Like I'm probably gonna start go go through Django tests and then probably have fixtures and then go to PyTest.
So there's already some introduction to fixtures if that's good to people, and and then kind of get into the plugins, but have that be more like where you go from here.
The you know, there's so many plugins for for PyTest, and everyone seems to kind of like their different flavors.
Yep, yep.
So definitely want to talk to you about translations, which was uh I mentioned at the beginning.
So you gave a talk which we'll link to in the notes at Pi Cascades recently.
And yeah, we've got lots of questions.
I'd love you to maybe tee up the talk and how it came about for you personally.
Sure, sure.
So I'll give the story.
Um I'm from America, my wife is from China, and we've been married for coming up almost six years now.
My wife, since being in the United States, has been very entrepreneurial.
She's always looking for, you know, ways she can employ herself, um, use her creative talents, do stuff.
So she's done like a dance studio, she's done photography, and she's also done importing and exporting with China.
Uh, we've imported custom-made, tailor-made suits and dresses, we've exported all different kinds of um different goods and such.
And so, with that import-export business, uh, she wanted a way to be able to track all of the orders to make it easy.
She was using big scary spreadsheets and it was sloppy and all that stuff.
Anytime you see the big scary spreadsheet, software solution opportunity.
Boom, there you go.
Yep.
So it the first thing we did was the suits and dresses, but it moved on to other things.
And so we wanted to make a better software solution for this.
And we also wanted to enable her mom to be able to contribute to this as well.
So my wife is bilingual, English Mandarin.
I speak English, I can pretend to speak Chinese, and Mama speaks Mandarin only.
So problem.
So I was thinking, okay, what's what's the best way to make this kind of software solution?
And that's when I I discovered the Django project.
I was like, okay, well, here is a web application framework.
It gives you the ORM for a database, and it will give you this admin site for your front, basic front end, where you can go in and manipulate the data models.
It gives you the forms, and it also has that translation framework built into it.
I'm like, this is perfect.
So I I built the application, I did the translations throughout the entire thing, and I deployed it to Heroku, and it's um one of them is still being hosted there today.
Were you thinking you wanted to use Python, or is it just on its own Django?
What so this is the first time you used Django?
It was the I guess I'm wondering why, or what else factored in.
Was it did you want to use Python, or was it really just knowing about the translation app and the admin said, oh, and knowing multiple languages, you're like, oh, that's a good reason to do Django Python.
Sure.
I think it was it was both.
It was both the language as well as the framework itself.
Because this was, gosh, I don't even remember.
I want to say this was like 2016 when I started this journey, so to speak.
Uh, I had done Python at Max Point at that time.
In fact, I had done Python in high school way long ago, like 2005, 2006.
It was 2.4, 2.5-ish, I think at that time.
I can't remember.
And then I had left Python, never touched it again until I went to Max Point in 2015, and I started doing it again.
And I fell in love.
I was like, this language is great.
And then with that in mind, when I went to into looking at, okay, I need to develop a web application for these side businesses that we're partnering up with, uh, what what's the best thing out there?
And I had not done web development myself at that point.
I had tested web apps, but I had not done web development.
And so it was all new to me.
And I'm like, well, what web frameworks are out there?
And so you Google and you see things like Angular and React, maybe I don't even remember if that if at that time they were out.
I think I think Angular was.
But I was looking at
React came out in 2015-16.
Yeah, yeah.
So they those were kind of like new, hot off the press.
So I was looking at those, and then I saw Django and I saw Flask.
I'm like, you know, this Django thing looks looks pretty good.
And I I know Python.
Python's awesome.
Um, so I I started doing like a feature comparison, and that's when Django just blew it away because it's like it has everything I need, and it's easy.
And there's tutorials online from the official documentation, and so I I've ripped through that tutorial, and that's how I learned Django.
That was kind of like the test case of is this really what I think it is?
And it was.
And I'm like, done.
So I decided Django it is, never look back.
Yep.
For listeners who haven't used um translations, I liked in your talk, you kind of broke down the workflow into I think it was four different parts.
Yes, yes.
So let's see if I can recall this off the top of my head.
The the four stages of translation are first you have to prepare your settings PY file.
There's some Bid awares, there's some options, uh, some pads you you I don't want to say need to set, but should set, um, to just kind of prep prepare your Django application.
There, the second part would be then setting up your URL routing.
Django has a nifty feature where you can have these language prefixes in your URL so that if you want to force it to go to a Chinese page, you can just shove that in the URL and it navigates right there.
The third step is marking all of your strings in your application for translation.
That's the most painful part.
Yeah.
If you are starting a greenfield project up from scratch and you have that in mind, it's not as difficult because it's a it's a it's a tax as you go kind of thing.
Like, oh well, yeah, of course these model names need to be translated, and of course these view strings need to be translated.
But if you already have an established project and you're going back and trying to find everything, especially if your projects of any size, ooh, that can be rough.
The the fourth bit is actually making those message files.
You'll you you run a basic Django command, it gives you the templates for them.
And the message files are basically a one-to-one mapping.
You have a string in either the language you wrote or a token that you've used for the application front end, and then it gives you an empty string for what the translation is for that particular locale, and you've got to put that in.
Django doesn't give you Chinese.
So there were many, many nights on the couch where I would be working on this thing.
I'd say to my wife, hey Han, can you please translate these strings for me?
My personal experience with with translations is this there's a a website called Quizlet, and we I led the translation of it into a bunch of languages.
And the interesting thing was figuring out, especially when it's a language like Chinese, which is one of the ones we did, you know, what is that string like length?
Is it can you just do a phrase?
Can you do a word?
Can you do a sentence?
I'm curious, you know, what how you've learned doing that, right?
Because it's one thing to maybe you could change the word the directly translate, but if it's a phrase or it's slang, that's kind of where it gets a little bit harder to decide, right?
Like absolutely.
Yeah, I I always did at the phrase level.
Um, thankfully, I never had a lot of long text to translate, but even in the times I did, I would just use, you know, the the full thing.
Because if if you try to piece it word by word and try to splice that together, the grammar's not going to be right.
It's gonna be what it's gonna be weird.
So always, always at the the phrase level.
What are you trying to say?
Translate based on that intention.
And Carlton, have you dealt with translations personally in the the Django realm?
I think you've
yeah, I've you I've used it, but not not on personal sites, on client sites used translation um things.
And the the issue is exactly right, marking the translation ski um translation strings, and then in my experience, you'd always hire out that there are agencies that will um and they do a great job.
I can't remember any off the top of my head, but they do a really good job.
You you outsource your your your string files with the target languages, and they will go and recruit you know people.
And that's a very scalable way of doing it, and you know, quite affordable, really, given what you're trying to achieve.
Um if I was building my own site, I'd be able to translate it into Catalan or Spanish, but beyond that I'd need outside help.
Well, and then there's the phases too of I guess this would apply more to a larger scale site of so you do the first wave of translations, but then um sites change, and then figuring out how you know tip of the spear are you with with the translations.
Do you do it monthly?
Do you say a certain number of new text?
Do you kick it over?
Those are sort of the maintenance realm questions that kind of come up.
But I guess that's not really Django specific, but more just something that happens also in these projects that you may not think about it up front.
I will say Django does make it very easy to identify new strings because uh when you when you go to regenerate those messages, when you go to regenerate those message files, the new strings are always, I believe, like popped at the bottom or something, or you can do like a quick control F and see all the empty or the fuzzies.
So it's it's very, very easy just to rerun that command and just see all the new stuff pop out so that you're not missing anything.
Um, recently within Precision Lender, the company where I work in the past year or two, they had to do translations for our application.
And it was a nightmare of work because it was this huge application, so many places.
And even to this day, we still struggle with missing tokens, right?
Well, somebody will pop in a new token on the front end, but because there's no mechanism to just scrape the entire application and find all of those, um, it's it's really just up to the quote unquote best practice for the developer to you know add it, I believe, to or to to notify um somebody to say, hey, we need a translation for this thing.
And of course they get me astro.
And that's why I was asking you, Carlton.
I actually haven't used Django, the translation app myself.
So that's kind of why I was teeing up the earlier question to you.
No, I mean I'd know for my own pro personal sites.
I'm very lazy and I don't uh put it on my probably should, but uh
the sign of a good programmer practice laziness.
Yeah.
The reality is I'm not gonna translate my own personal site, you know, my own personal project.
But if it's a work project, then you know, more or less now.
Um it's it's kind of compulsory.
I mean, it has been for a long time.
Since mobile apps came along, you know, and app stores put it in you know so many countries, it's just become widespread.
It's become, you know, you it it it if you're gonna do business in Europe, you need English, you need Spanish, you need French, you need German, you need Dutch, you need Hungarian, you need, you know, the 27 member states, they've all got their own languages.
Well, and one thing that's changed, and at least since I was working on Quizlet a couple number of years ago, was the you know, browser level automatic translations, especially if you're using Chrome, are quite good actually.
Like this is for me with my work where I I write books, I have them as PDFs right now.
I'm moving that all online in part because people can translate it.
So, you know, it's not perfect, but they can get a lot of the way there in a way that I would like to have translated versions of my books, but I update to all the them all the time.
And um, that's sort of like a nice hack at my low level.
But if I was a company, you know, I would want to you do formal translations as opposed to in-browser.
Well, it's it's cool.
Um but that's something that's pretty powerful, actually.
I mean, I use it sometimes.
It's like that quality feel.
Well, if you're a company, you want that sort of quality feel.
And like, you know,
you can tell that it's it's a little hacky, yeah.
Um another point you made in your in your talk that I really liked was localization versus internationalization.
I wonder if you could explain.
Sure.
What's the difference between the two?
Because they sound the same.
Yeah, yeah, yeah.
And uh and actually a lot of times people use them interchangeably.
But if you want to nuance those terms, localization is the process of fitting an app to a specific locale, usually a locale being like a country.
So a a good example of locale versus language would be British English versus American English versus Australian English, right?
Or Spanish or Spain Spanish versus Mexican Spanish, right?
Those those are the same language, but they're different locales.
And so usually when we say locale, it it is a difference between like English and Spanish or English and Chinese, but it can be small things like phrases or spelling.
Um locale also includes things like um date format.
Yeah.
Uh right, do you put the month first or you put the day first?
Right.
It could include um other things beyond just linguistic things, things like uh you know, are are certain pictures or gestures or things taboo in another culture?
Yeah.
Um right.
Well, the map the mapping companies certainly know how to do that.
Yeah, yeah, yeah.
Um one one that I always like to think of, because I'm a I'm a video gamer.
Well, maybe not as much as I used to be.
I'm a Nintendo fanboy.
Uh Nintendo always removes religious references when they send stuff to the United States.
So anything with like a cross shape on it, that's scrubbed out for localization.
Oh, but in Japan, I guess there's wherever it's not.
So that's that would be an example of a non-lingistic localization.
So now um comparing that to internationalization, internationalization refers more to the tools and the frameworks and the processes for doing localization.
So the localization would would be it if you think about the artifacts, whereas the internationalization is more of the the process and the platform.
So the internationalization could be something like the fact that Django provides a translation framework, and the localization would be my Mandarin Chinese message files.
That that's helpful.
That's definitely something I've I've had, I've confused those phrases myself.
And if you go I like that you if you go back to your call that out.
If you go back to sorry, Will, if you go back to your four steps, Ernie, like the internalization is the first couple, right?
You set you set you do the settings, you mark the strings, scroll translation, and then the localization is the end, the latter steps.
Correct.
That's a great way to see it.
I didn't even think about that.
I should update that because I've given this talk at the the PyCon virtual um conference thing.
Um yeah, the first three steps would be internationalization, and the fourth step would be the localization.
That's great.
I that's a great way to frame it.
I'm gonna I'm gonna take that.
No poem.
In terms of testing your translations, is it is it just basically you can see what so there's two level levels.
One is just seeing string or token hasn't been translated, which I assume you can sort of see as like a coverage version.
Um and I guess that's the one you have to focus on because the other is qualitative and it'd be a bit challenging.
Yeah, yeah.
So that it testing localization is actually a great, or I should say testing translations to be correct with terms.
That is that is a very, very um interesting aspect for testing, specifically testing and automation, because there's so many layers to it.
Like the the first thing would be testing the internationalization.
Does does your application actually have the mechanisms in place to flip from say Chinese to English and back again?
Right?
So there's that kind of testing that has to happen.
Um, because yeah, if if you think it's being translated into Chinese, but it's not, and it's at the framework level, that's a problem.
Um now, thankfully, Django, I'm I'm I'm assuming Django has test cases, unit tests for that somewhere buried in the framework.
I haven't looked at the source code of that.
I mean it it must forget.
Yeah, no, I mean we test and we test things like for instance, um when you put in the language prefix into the URL, you know, is that respected?
And then what's the active language inside the test case at that point?
And I've kind of, you know, all the all of those stuff is quite robustly tested because it it's hard.
So when we talk about the URLs, so for example, if it's example.com, it'd be like slash, you know, GB if it's Great Britain English, whereas it'd be slash, I don't know, br for Brazilian Portuguese, right?
That's kind of what we're talking about in terms of why you're configuring the URLs.
Yes, yes.
Just for you know whereas if you were in a I suppose if you were in a uh single page application setting, you might just have it all being Ajax loaded and you wouldn't need the different URLs.
Correct.
But it's seems simpler to me anyways to have it in the URLs.
You can you can do it by the user preference as well.
So um dip depending on depend there are various ways of configuring it, but you can have it such that the same URL will serve multiple languages depending on what the user set by.
You could set a cookie or something in the session to to give them a language option.
Because you can sniff and you can see in their browser, yeah, you can see their default browser.
Browsers have preferences as well, and Django falls back through there's a various ordering as to which one it will it will accept.
You you know, you'll fall back to the browser preference, but then the URL or the cookie, or I I'd need to go and look at the source code to remember the exact ordering.
Yeah, it's all on that middleware.
And I should also say you're not required to do the URL language prefix in Django.
It's it's more of an optional thing you can add on if you so choose.
I just find it to be very, very helpful.
And so that's why I always recommend it.
So that was phase one of the uh testing.
So your first thing would be making sure your framework is doing the language stuff, that internationalization stuff correctly.
Then even though Django would handle most of that, you would still want to do things like, hey, if you are limiting your available languages, you'd want to have a few test cases for that.
Like the in Django, you have that languages option in the settings PY PY.
If you set that, it will say it will only serve these sets of languages, and anything else is errored out, I believe.
Well, full back.
So you might want to have a few tests against that just to make sure that you know that's good to go.
And if somebody changes something, you know, all that kind of stuff.
Um, the the next type of uh translation testing would be uh a visual test, and that would be to make sure that you actually have the the page trans or you have all of these strings being translated on your page.
So when I was doing English to Chinese, it was very easy for me because I can read English, I can't read Chinese.
So I would do manual testing, load the page, switch it to Chinese.
If I can read anything on the page, then I've missed something.
Yeah.
Now that's something that is very, very difficult to do with traditional automation because what are you gonna do?
You're gonna scrape every single field?
That's a case where visual testing is a much, much better solution.
So there's there are tools out there, like Selenium Base has a screenshot and comparison function.
Excuse me, you can pay for a tool as a service like Appla Tools, where they'll take um snapshots of your application and then compare them over time and use use AI to try to find the most critical parts, just kind of flag you to say, hey, was this changed and it seems um critical, can you give a thumbs up or thumbs down?
So that's where that kind of testing I think would be very, very useful for um uh automating language translation on a live application.
Because it's like, oh, it's right there, boom, visual is the way to go because clearly, if you have English words versus Spanish words versus French words, they're going to appear very differently to a machine, but you may gloss over with your eyes as a manual tester.
And then yeah, the the third thing would be the qualitative test.
Um, the do the language phrases you put in make sense.
And you really need somebody who's fluent in that language to look at it and be like, hey, this ain't right.
And I've had that happen a couple times because um context is so important with your translations, right?
When you send off those language files, those messages files, right?
Sometimes it may only be a single word or maybe a small phrase, isolated from everything else, and you give it to I would give it to my wife and say, here, translate this phrase, and she would translate it.
And then that language file with that translation would get sucked up into the application.
I'd deploy it out there in Heroku and say, okay, here's the page, does it look good?
And she'd be like, What the hell is this field?
What that doesn't make any sense.
It's like, well, what do you mean?
You gave me the translation, and she's like, Well, no, it really should be this instead.
It's like, okay, there's your qualitative test.
Yeah, one one thing you just quick point that comes up is one thing you can do is when you're marking the your strings for translation, you can add a special translator's comment, which it appears in the um string file, but they can then it gives a bit of context.
You say, look, this is true, this is appearing here, or try to keep this short, or you know.
Sure, sure.
Um, which is kind of handy, but it's we're short of getting a native speaker to look at your result and tell you if it's any good.
Yeah.
There's no solution, right?
Yeah.
Carlton, do you know as the perhaps most likely Django historian in this chat when translation was added?
No, like ages ago.
Long or
I don't know actually who's responsible for it.
I mean, it's one of those black box parts of Django to make.
I'd have to go and ask some of the old hands um exactly the story there.
But it's been there for ages and ages and ages and ages and ages, like a decade, like more and more.
Wow.
Okay.
I I was gonna add um uh for listeners who want to see an example specifically of of it changing in the UR URL routes, um, the site listennotes.com we had uh the founder Wenben on, um, he's got a really nice homepage, and at the bottom you can scroll down and uh cycle through it's like 20 different languages, and you can see both that the URL changes at the top, there'll be a slash, and then the the language prefix, and then also you can see that the um the text changes.
And so because I'm assuming your your site is it's uh is like a private one, and or or we could share yours as well if you'd like.
Well it's it is private, so okay.
Yes, but the listen notes is a really good example of of it.
And the Django docs, of course, jack docs.jjango project.com, they're translated into you know what, seven, eight languages.
Um hadn't even thought of that.
And the source code for that is is uh available.
Yeah.
Oh good call card.
Yeah, but why why did we think of that?
Like what's the what's the way to represent?
There are there are docs.
It actually makes me Yeah, I haven't actually looked at it, but I've also you know I wonder if you know when the way Django also does the version numbers where you can click through and it changes, that seems like that'd be a like a mutation of the language framework, but I don't know how it's actually implemented.
Yeah, right?
It's very similar to the
language prefix, and then there's the version prefix, and then inside that is the docs for each particular um each particular build.
But like, you know, going back to well, what's if I click on the versions, going back to 1.8, you can see there, um, and then all the languages going back to 1.8 alive, and then the development version is only in English.
Um, that will be translated for um you know 3.1 when we when we tag 3.1, when we broke branch 3.1.
Who does who does those translations?
So this is a really good question because while we have people listening, there's a translations team, an internalization internationalization team, a translations team that you can join and contribute, and you can help translate um the strings inside the Django framework and the docs as well.
And we can have more docs versions, but they need to be translated into the the languages, and they need to be, I think, 70 or 80 percent complete before we'll put that new version up.
So if you want your language, you know, come and join the team.
If you go to the list of mailing lists, there's an internalizational internationalization mailing list that you can join.
It's just a Google group.
You can say, hey, I'd like to volunteer, and it's all run on a thing called Trans Effects, which is a service which enables you to log in and you can translate individual strings and collaborate on that translation.
And yeah.
We'll put a link to that in the in the notes.
And we should actually come and join in.
It's it's interesting now that I'm on the Django board, so instead of saying, Oh, someone should do something or other, it's like I should I should do it.
One thing I really do want to do is write some blog posts, official blog posts, talking about these various teams that we have and the people who do unsung work, so translations, the ops team, the security team.
I'm sure there's other teams I'm not thinking of, more just to let people know and do you know little call-outs to folks.
Because I'm certainly I've dealt with the ops and security team quite a bit recently, and you know, they do a ton of work for and nobody m most people don't know about it.
Um, same with translations, so note to self, I need to write those blog posts and and also yeah, make it available let people know.
Like you don't just have to sit there and say, I wish Django was translated into this language, like you can you can you can help us.
Yeah, and
okay, so we'll
link to that.
There's very knowledgeable people that have been doing it for a long time that had sort of head up that effort and yeah.
Yeah, perhaps we could have one of them on too.
Um there was one more thing, Andy, I wanted to ask you about, and then obviously whatever you want to talk about.
Um so Pi Carolinas, you've been involved and work around that.
Yeah, yeah.
What's the context for that?
Sure.
So um a little little bit of history.
There's only ever been one Pi Carolinas, and that was way before I was back into Python.
It was 2012.
It was held here in the triangle, it was at UNC, very small conference, nice.
Um, Calvin Spielman was the chair, Iron Froggy on Twitter.
Then his life changed, never happened again, so be it.
Then in 2016, we had a Pi Data conference here in the Carolinas.
And the only reason I even knew about that was because my company, Maxpoint, was one of the top-level sponsors.
It was here in Research Triangle Park, IBM was the main sponsor of it.
There were like three, four, maybe five hundred people.
It was a good size.
And that was actually the first conference that I spoke at.
I gave a talk on Python testing because my company at the time was like, everybody submit to speak.
Like, okay, and I just got accepted because the the testing talks are always the token talks at Python conferences, and you always get at least one, so boom, and nobody else really submits for them.
Don't take my secret.
But uh I really, really got involved in the Python community starting in 2018.
Uh, that's when I spoke at PyCon the first time, it's when I went to PyOhio, Pyke Gotham, PyCon Canada, and I just I've been addicted to these things.
They've been going all over the world for Python conferences.
But at PyCon 2019, I was thinking to myself, you know, it'd be really cool if we had a Python conference in the Carolinas again.
And I was talking with some other people from the Carolinas, they're like, yeah, yeah, we should do that.
We should do that.
And I'm like, okay, well, I guess I'm it's a duocracy, so I might as well try to make this happen.
So I went to an open space for a conference organizers, and I just wanted to learn what it means to run a conference.
And then Dustin Ingram, who was leading that open space, he he comes up to me afterwards and is like, hey Andy, do you want to announce a call to action to get a Pi Carolinas going tomorrow on stage in front of like a thousand people?
And I say, Yes!
Because I just I don't know, I was so excited at the time.
So I get up on stage and I make the call to action.
Please help me get this Pi Carolinas thing going.
I got in touch with Calvin, I met him, and so yeah, we um we've been trying to get it going, but it's been a little bit tough because life.
Well, I'm already uber busy with so many things.
But we have we have some some organizers together, we have a lot of people excited.
We have a venue, it'll be in Raleigh.
It's scheduled for June 20th.
Um, we'll see with coronavirus how that goes.
Uh I'm looking, it's gonna be somewhere between 100 and 200 people.
The original view was to make it like a two-day traditional you know, Python regional conference.
But given the whole coronavirus mess and the fact that we hadn't organized a whole lot because we've been busy, I decided to change up the format to make it an unconference.
So one day, lightning talks only, there'll be a sign-up ahead of time, but no official call for proposals, no big review committee.
Um, not looking to have like a huge expo area.
Um basically it's gonna be lightning talks and um open space and collab clusters.
And then we'll have maybe a few sponsors who know somebody for lunch.
Red Hat is our sponsor for the venue, um, that kind of stuff.
Keep it keep it small so that if we need to postpone it, it'll be easy.
Right?
Um, so that that's kind of the vision we have for Pi Carolinas right now.
Um I'm still hopeful that we can pull it off.
I am I have just a few small little tasks left to get the official website out the door.
I've developed it using Flask with um Zappa and uh Amazon Web Services so that it's all serverless, just kind of push it out there and boom.
You're a madman.
Tell me about it.
Well, I mean
No, I'm joking.
I'm joking.
I mean, no, it's yeah, I'm I'm admiring you.
I mean, Zappa is one of those things too.
I see talks and I briefly tried, and I was just like, oh my god, like until I have to, I won't.
Yeah, I mean it's it was really easy getting getting the thing out there just as a function.
I mean, I had the development one out there, it's just a really ugly URL.
The only thing that I haven't done yet is connected to the PiCare line is not org domain.
That's one of those things where I'm just like, uh don't have time right now.
It's been about a week or something.
Well, if you want to do that before we launch this episode, we'll uh we'll put a link to we'll put a link to one of them in the notes.
Either the official or
I'll get on that.
That's one of the things about web that I just yeah, every time I have to just grit my teeth when I'm dealing with DNS stuff.
It's I don't know about it.
It's like it's it's because it's not hard, it's just frustrating, and because of the timing, like I never know it's like, did it work, did it not work?
Is it because either it happens like in 10 seconds or it's like 48 hours for no reason.
And it just takes like a week every time I need to do some something or other like that.
You know, you've got you've got a day-long TTL and you type one character wrong and you hit submit, and you've and it's like no.
Yeah.
And that happens
every time.
And even just custom domains.
Like I I had a whole chapter in my uh my Django for Professionals book on how to do this because it's such a pain.
But it's like every provider is you know, who's got your domain is different, and you know, Heroku is I don't know, could be clearer, and yeah, I just like I just uh it's a shame though, because even for me, right?
Like I you know, it's like every year or two I'm like, how do I do this?
Yeah.
Oh my god.
Yeah.
So many things.
I I understand it takes it's not just like flipping the switch to
I'll I'll get on that.
Well, is there anything else you want to mention or plug as we wrap up here?
So you're your automation panda on Twitter, you're active there, you have your website.
Um what's what's the best way for someone to get in contact with you if they have a lot of different things?
Yeah, yeah.
So if you need to get in contact with me, I would recommend either Twitter at automation panda.
Uh you can go to my blog, automationpanda.com.
There's a contact form in there.
Or if you happen to be at your local Python conference, maybe I'll be there too.
DjangoCon is going to be in October this year, right?
In principle, yes.
Which one?
Uh US.
US one?
Yeah, DjangoCon US, sorry.
That's the plan.
Yeah.
San Diego as well.
Yeah, yeah.
I'm hoping, hoping to come to that one, but we'll see.
And um and DjangoCon Europe uh has been rescheduled for September at a country.
Okay.
Currently.
I mean, you know, all these plans are dependent on, you know, the coronavirus, obviously, and we'll see how that goes.
And maybe a quick shout-out on you know, Django News.
Uh I I run a newsletter, Django-news.com, that has weekly news on Django, including updates on conferences and and things like that.
So that's a good resource for people if they're not aware of it.
Um well, Andy, thank you so much for taking the time to come on and share what you've learned.
Really interesting.
Thank you, Andy.
Thank you for inviting me.
This was a lot of fun.
All right, and everyone, we're at uh Chat Django on Twitter and DjangoChat.com.
We'll see you all.
Tell us next time.
Bye bye.
Thank you.
Bye bye.