Django Chat

Translations - Andrew Knight

Episode Summary

Django has a powerful built-in translations framework that we discuss with Andrew Knight. Topics include internationalization vs localization, common gotchas, Django’s internal translations team, and more.

Episode Notes

Episode Transcription

Will Vincent  0:06  

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. Hi, Will. And this week, we're very pleased to have Andrew Knight joining us to talk about translations. Hi, Andy.


Andrew Knight  0:18  

Hey, thanks for having me. Glad to be here.


Will Vincent  0:20  

Thank you for coming. There's a lot of things we want to talk to you about. The big one is translations. But perhaps we can start with your background how'd you get into programming and, and your day job, which is also quite interesting.


Andrew Knight  0:31  

Sure. Cool. So man, I first started programming when I was in high school. ninth grade, I went to Parkway 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 ti 83 plus graphing calculator. And so here I am, I think I'm going to 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 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 ti 83 Plus, it's nothing sophisticated. But then, 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 RMIT got my degree in computer science, and I've just loved doing it ever since. So that's how I got started.


Will Vincent  1:40  

Well, that's fantastic. You had it? Yeah, in high school. It's still quite unusual in the States. 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 and that fell. So I wasn't even trying to do that. formulas I was just playing games. But that was, that was quite fun. So you came out and then what was your job cycle up until now?


Andrew Knight  2:10  

My goodness I've or when I went to school RMIT they require every student to do internships. It's you don't graduate unless you do internships. It's pretty cool. And landed in North Carolina. I've been in the triangle area for permanently for the past decade. I've worked at IBM, then net up then. Oh, gosh, there's too many of Mac's point interactive, which got bought out by glasses. Then LexisNexis the legal software. Yeah. And today for the past almost two years, I'm working at a company called precision lending, which recently got acquired by q2 software. 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 developed solutions to testing problems. So, hey, we we do nothing about manual testing solution. Let's try to automate some of those tests properly. Hey, we're struggling to figure out what should be developed and what should be tested. And we don't have the specs. Okay, let's do some example mapping. And let's do some Three Amigos sessions and actually come together as a team and plan before we code. That kind of stuff.


Will Vincent  3:31  

I guess two questions come to mind. For me. The first is which, what technologies have you been using? Right? Are you able to use Django or it sounds like maybe not Django for these. So yeah,


Andrew Knight  3:39  

Emma, it's great. You asked a question. In my day job. I'm not using Django. I'm not even using Python as a Microsoft shop, so my testing automation solution is developed in dotnet. C sharp, the data scientist at precision lender use Python. That side is all you know. In fact, they've even done a an Internal side project whether using 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 automation in 2007 with my first internship at IBM, but I came back to it like, you know, full time, never going 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, let's just make him do all the scripting. That was basically the attitude. And so right, um, I spent four years at NetApp. And I basically had to rewrite their, the team's automation solution, because it was it was rough.


Will Vincent  4:50  

And yeah, so that's, that's where I've been now that you're a relative gray beard. Well, how does that differ? Sorry, Carlton.


Carlton Gibson  4:56  

Well, I was gonna say that on all automation solutions, kind of Napoleon in exactly that way.


Andrew Knight  5:03  

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 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. So a lot of best practices get jettison very quickly people have this attitude that is just writing test scripts is versus you know, building a software stack and a solution that has to be maintainable that has its own unique challenges. It's a domain just like web development or micro services. Test Automation is a special domain and so you need to have a good expertise with it.


Will Vincent  5:43  

Yeah, like anything else. So what is your testing look like within your side project, Django apps, what sort of setup do you like to do


Andrew Knight  5:50  

actually with with my Django apps? My are just no testing at all.


Carlton Gibson  5:54  

I fly by the seat of your pants.


Andrew Knight  5:58  

Well, because my Django apps That I've developed are actually pretty small. Like, I can talk about them a little bit later, but they are pretty small. So 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 I needed for my purposes, again,


Carlton Gibson  6:17  

and that was UI testing as part of the frameworks.


Andrew Knight  6:21  

Exactly, exactly. So it's like, I'm not going to repeat history there. But the testing that I do do, I've done 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 test database and pulling it away. I've done Gosh, what else? Yeah, just basic utility function testing. I've I've tied it in with unit tests. I've tied it in with PI test pi test is lit up pi test.


Will Vincent  6:47  

So yeah, so I was gonna ask, do you use primarily pi test or do you do a mixture?


Andrew Knight  6:52  

I strongly strongly advocate for pi tests. I believe very strongly that pi test is a far superior framework than unit test. The one advantage unit test has I think, Well, 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 tests style tests. Yeah, that doesn't make it better. It just makes it easier for some people to come in.


Carlton Gibson  7:28  

But not just I find, it's not just people who are familiar with that, I think beginners find the way pi test deals with fixtures difficult and they create some sort of giant contest 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 scope automatically scope just to that class and I you know, as you can As you come to use PI tests more you learn up, but I can just create a fixture in my test class that I'm grouping everything and you can do the same thing. But it's not as automatic, I would say with PI test is not dictated to.


Andrew Knight  8:15  

Yeah, I could see that


Carlton Gibson  8:19  

you apply to school? We?


Andrew Knight  8:21  

Yeah, I mean, I find that the fixtures are far more flexible and reusable and cleanup methods, I find that the code is a lot cleaner when you're done with it. And the other thing I absolutely love about pi tests are the plugins. Like 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. 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 pi test is the best framework for testing in any language today. Super, I'll stand by that.


Will Vincent  9:00  

What would you change about pi tests? Just to like, round out this conversation are there? Because I've heard for you, what areas would you change? If you could about it?


Andrew Knight  9:08  

What would I change about pi tests? Especially


Will Vincent  9:10  

given that you you have such a broad experience of other testing, you know, ways outside of the Python ecosystem?


Andrew Knight  9:15  

That's a great question. I never considered that. Um, I'm not sure if there's much I would need to change a PI test simply because you do have that plug in architecture where if you want to change something you can maybe some some quality of life things like making it easier. No, nevermind, that that's covered by tags. Some of the naming of things like parameterize is, is British English, not English, or American English?


Carlton Gibson  9:42  

Stuff like that. No English English. You nearly said.


Andrew Knight  9:46  



I always thought the name cough test dot p y was weird. You know. I do like how that one though, can can apply to different directory levels, which is nice.


Carlton Gibson  9:59  

Yeah, that's super cool. That's really soon.


Andrew Knight  10:00  

Yeah, yeah. So there's like, the nice thing about pi test is it's it's comprehensive and flexible yet it still feels minimal. So, um, yeah, I'm not sure there will 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


Will Vincent  10:20  

yeah, I think beyond the syntax, it's the it's the fixture nature of pi tests that trips up 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, if someone's learning on their own, is a foreign concept. So I agree with your you know, that's the big leap for people when they jump to pi test. And, and, you know, for me, I'm working at some point, I'm going to 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 going to start, go go through Django tests, and then probably have fixtures and then Go to pi test. So there's already some introduction to fixtures offends 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 pi tests, and everyone seems to kind of like their different flavors. Yep. Yep. So definitely wanna talk to you about translations, which was, I mentioned the beginning. So you gave a talk, which I will link to in the notes at pi cascades recently. And, yeah, but we got lots of questions. I'd love you to maybe tee up the talk and how it came about for you personally.


Andrew Knight  11:32  

Sure, sure. So I'll give the story. I'm from America. My wife is from China. And we've been married for coming up on 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, 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 with China, we've imported custom a tailor made suits and dresses. We've exported all different kinds of different goods and such. And so with that import export business, 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 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 like this, this perfect.


Will Vincent  13:25  

So I, I built the application, I did the translations throughout the entire thing. And I deployed it to Heroku. And it's 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 use Django 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.


Andrew Knight  13:56  

Sure. I think it was goes both ways, both the language as well as the difference work 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, I had done Python at max point at that time. In fact, I had done Python in high school way long ago, like 2000. Oh, wow. 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 Mexico in 2015. I started doing it again. And I fell in love. I was like this like, which 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 were partnering up with. What was 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 Native. I mean, remember that at that time, they were out I think I think Angular was


Will Vincent  15:01  

what I was looking at. Yeah, I think I think Yeah, React came out. 20 1516


Andrew Knight  15:05  

Yeah, yeah. So those were kind of like new hot off the press. So I was looking at those. And then I saw Django and flask. I'm like, you know, this Django thing looks looks pretty good. And I, I know Python pythons awesome. So I started doing like a feature comparison. And that's when Jango 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've read through that tutorial. And that's how I learn Django. Now, it's 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 is never looked back.


Will Vincent  15:45  

Yep, fair enough. For listeners who haven't used translations I liked in your talk. You kind of broke down the workflow into any goes for different parts. Yes,


Andrew Knight  15:53  

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 people I find there's some middlewares, there's some options, some pads, you you, I don't want to say need to set but should set to just kind of 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 into 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 from scratch, and you have that in mind, it's not as difficult because it's it's a it's a taxes 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 it free thing right? Especially if you're projects of any size, that can be rough. The fourth bit is actually making those message files, you'll 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 say, to my wife, hey, hon, can you please translate these strings for me?


Will Vincent  17:41  

My personal experience with with translations is this. There's a website called Quizlet. And we, I lead translation of it into a bunch of languages. And the interesting thing was figuring out especially with the 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, you know, Do a word into a sentence. I'm curious, you know what, how you learned doing that, right? Because it's one thing to maybe you could change the words that 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,


Andrew Knight  18:14  

yeah, I always did at the phrase level. 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 full thing because if you try to piece it word by word and try to splice that together, the grammar is not going to be right. It's going to be was gonna be weird. So always, always at the phrase level, what are you trying to say translate based on that intention? And, Carlton, have you dealt with translations personally, in the Django realm?


Carlton Gibson  18:44  

I think, yes. I've used it but not not on personal sites on client sites used translation, dumb things, and that the issue is exactly right, marking the translation, skip translation strings, and then in my experience, you'd always hire out there There are agencies that will, then they do a great job, I can't remember any of the top of my head, but they do a really good job, 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.


Will Vincent  19:24  

If I was building my own site, I'd be able to translate it into Gatlin or Spanish. But beyond that, I'd need outside help, when there's the phases to have I guess this would apply more to a larger scale site of so you do the first wave of translations, but then sites change and then figuring out how, you know tip of the spear Are you with with the translations Do you do monthly? Do you say certain number of new texts 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 upfront.


Andrew Knight  19:58  

I will say Django does make it very easy. To identify new strings, because when you when you go to regenerate those meshes, 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 Ctrl 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. Recently within precision Lennar, the company where I work in the past year to they had to do translations for our application. And it was a nightmare work because it was his 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. It's it's really just up to the quote unquote best practice for the developer to you know, add it, I believe to our to notify somebody To say, Hey, we need a translation for this thing.


Will Vincent  21:02  

And of course, they get me a stroke. 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. You know, I mean, I,


Carlton Gibson  21:11  

about you know, for my own personal sites, I'm very lazy. And I don't put it on my property shirt. But so


Will Vincent  21:19  

the sign of a good programmer, practice laziness. Yeah,


Carlton Gibson  21:24  

frankly, it is I'm not going to translate my own personal site, you know, my own personal project. It's a work project then, you know, more or less now. It's, it's kind of compulsory. I mean, it has been for a long time since mobile apps came along. You know, an app store's put it in, in so many countries, it's just become widespread. It's become


Will Vincent  21:43  

you know it. If you're going to do business in Europe, you need English you need Spanish, you need French you need German, you need Dutch, you need Hungarian unit. But you know, the 27 member states, they've all got their own languages. Well, and one thing that's changed at least since I was working on Quizlet, a couple number of years ago. Go is 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, 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 get a lot of the way there in a way that I would like to have translated versions of my books, but I update all them all the time. And that's sort of like a nice hack at my low level. But if I was a company, you know, I would want to do formal translations as opposed to in browser, but it's, it's cool, but that's something that quality pretty powerful, actually, I mean, I use it sometimes


Carlton Gibson  22:38  

it's like cook that quality food company, you want that sort of quality feel and


Will Vincent  22:43  

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 assure what's the difference between the two because they sound like


Andrew Knight  22:58  

Yeah, yeah, 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 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 is a difference between like English and Spanish or English in Chinese but it can be small things like phrases or spelling. locale also includes things like date format, yeah, right. So you put the street you put the day first, right include other things beyond just linguistic things, things like are certain pictures or gestures or Things taboo in another culture. Yeah.


Will Vincent  24:04  

Right. Well, the Matt the mapping companies certainly know how to do that. Yeah, yeah.


Andrew Knight  24:07  

Yeah. Well, one that I always like to think of because I'm I'm a video gamer, well, maybe not as much as I used to be. I'm a Nintendo fanboy. And Nintendo always removes religious references when they send stuff to the United States. So anything with like a cross shape on it that scrubbed out for localization?


Will Vincent  24:26  

Oh, but in Japan, I guess it does fly wherever it's not.


Andrew Knight  24:29  

So that's that we have a non linguistic localization. So now I'm 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 if you think about the artifacts, whereas the internationalization is more of the the process and the platform. So internationalization could be something like the fact that Django provides a translation framework. And the localization would be my Mandarin Chinese message files.


Will Vincent  25:10  

That's helpful. That's definitely something I've, I've had, I've confused those phrases. And if you go to like the you, you go back to call that out.


Carlton Gibson  25:17  

If you go back to sorry, well, if you go back to your four steps, only, like the internalization is the first couple. Right? You said you said you do the settings, you mark the strings, translation. And then the localization is the end, the latter steps?


Andrew Knight  25:32  

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 Python virtual conference thing. Yeah, the first three steps would be internationalization. And the fourth step would be the localization. That's great. That's a great way to frame it. I'm gonna I'm gonna take that.


Will Vincent  25:50  

Nope. In terms of testing your translations Is it is it just basically you can see what so there's two low levels, one is just seeing stringer. hasn't been translated, which I assume you can sort of see. It's like a coverage version. And I guess that's the one you have to focus on. Because the other is qualitative and yes, be challenging. Yeah. Yeah.


Andrew Knight  26:11  

So that it testing localization is actually a great or I should say, testing translations to be corrected terms. That is, that is a very, very interesting aspects for testing a specific testing and automation, because there's so many layers to it. Like the The first thing would be testing the internationalization those, those 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. 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. Now, thankfully, Django, I'm assuming Django has test cases unit test for that somewhere buried in the framework. I haven't looked at


Carlton Gibson  26:58  

the source code of that. I mean, It must really know, I mean, we test it and we test things like, for instance, when you put in the language prefixed into the URL, you know, is that respected? And then what's the active language inside the test case at that point, and kind of, you know, all all of those stuff is quite robustly tested. Because it's hard.


Will Vincent  27:18  

So we we talked about the URL. So, for example, if it's, it'd be like slash, you know, GB, if is great britain English, whereas it'd be slash, you 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. Whereas if you were in a, I suppose if you were in a 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 anyway, to have it in the URL.


Carlton Gibson  27:52  

You can you can do it by the user preference as well. So 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 too.


Will Vincent  28:08  

So yeah, the language option, because you can sniff and you can see in their browser, you can see their default browser settings have preferences as well.


Carlton Gibson  28:14  

And Django falls factory, there's a various ordering as to which one it will Yes, it will accept, you know, the full back to the browser preference, but then the URL or the cookie, or I need to go and look at the source code to remember the exact order.


Andrew Knight  28:28  

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 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.


Will Vincent  28:43  

So that was phase one of the test. So


Andrew Knight  28:46  

your first thing would be making sure your framework is doing the language stuff that internationalization stuff correctly, then even 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, in Django, you have that languages option in the settings p while p y they, if you set that it will say it will only serve these sets of languages and anything else is aired out, I believe with full 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. The next type of translation testing would be a visual test. And that would be to make sure that you actually have the the page trans, 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 all thing that is very, very difficult to do with traditional automation, because what are you going to do? You're going to scrape every single field. And 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 applitools, where they'll take snapshots of your application and they compare them over time you use AI to try to find the most critical parts to just kind of flag you to say, hey, was this changed? And it seems 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 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 are going to appear very differently to a machine but you may gloss over with your eyes. As a manual tester, and then yeah, the third thing would be the qualitative tests, the do the language phrases you put in makes 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 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 will 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 deployed out there and Heroku and say, Okay, here's the page doesn't look good. And she'd be like, what the hell is this field? Well, that doesn't make any sense. And it's like, What do you mean, you gave me the translation? And she's like, Well, no, it really should be this instead. Okay, there's your qualitative test. Yeah.


Carlton Gibson  31:52  

Well, one thing you just quick point that comes up is one thing you can do is when you're marking your strings for translation, you can add a special translators comment, which is appears in the string file that they can then it gives a bit of context you say look, this is sure this is appearing here or try to keep this short or you know, sure sure. Which kind of handy but it's a very nice way short of getting a native speaker to look at your result and tell you if it's any good


Andrew Knight  32:17  



Carlton Gibson  32:19  

no solution right?


Will Vincent  32:20  

Yeah. Carlton Do you know is the perhaps most likely Django historian in this chat when translated those added No, like ages ago long ago actually know who's responsible for it? I mean, it's one of those blackbox


Carlton Gibson  32:34  

Django I'd have to go and ask some of the old hands 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,


Will Vincent  32:46  

okay. I was gonna add for listeners who want to see an example specifically of changing and the URL URL routes, the site listen notes calm. We had the founder when Ben on he's got a really nice homepage and at the bottom, you can scroll down and cycle through, like 20 different languages. And you can see both that the URL changes at the top to be a slash and then the language prefix. And then also you can see that the text changes. And so because I'm assuming your site is it's like a private one. Yeah. Or we could share yours as well, if you'd like. It's okay. Yes, but listen notes is a really good example of


Carlton Gibson  33:27  

it. The Django Doc's Of course. docstoc, Django project comm they're translated into, you know, what seven, eight languages hadn't even thought of.


Will Vincent  33:38  

And the source code for that is available. Yeah. Oh, good call.


Andrew Knight  33:43  

Why do we think of that? What's the way to represent that?


Will Vincent  33:48  

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 changes. That seems like that'd be good. Like a mutation of the language framework, but I don't know how it's actually implemented yet, right? It's very similar. Yes,


Carlton Gibson  34:06  

there's the language prefix. And then there's the version prefix. And then inside that is the docs for each particular build, but like, you know, going back to what's if I click on the versions, going back to 1.8, you can see there and then all the languages going back to 1.8. alive. And then the development version is only in English, that will be translated for you know, 3.1. When we when we take frequent one when we put branch 3.1.


Will Vincent  34:36  

Who does who does his translation? So


Carlton Gibson  34:38  

this is a really good question, because while we have people listening, there's a translations team and internalization, internalized internationalization team, a translations team that you could join and contributes, and you can help translate 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 languages Since they need to be, I think 70 or 80% 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 international internationalization mailing lists 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 yet,


Will Vincent  35:27  

we'll put a link to that in the in the notes, and we should actually come and join in. It's it. It's interesting now that I'm on the Django board. So instead of saying, I want you to 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 post 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 seem quite a bit recently and you know, they do a ton of work for a no, but most people don't know about it. Same with translations. So, Note to self, I need to write those blog posts and, and also, yeah, make it a bit let people know like, you don't just have to sit there and say I wish Django is translated into this language like you can. You can you can help


Carlton Gibson  36:19  

you. Um, great. Okay, so we'll link to that very knowledgeable people that have been doing it for a long time that had to head up that effort. And, yeah,


Will Vincent  36:29  

yeah, perhaps we could have one of them on to um, there was one more thing Andy, I want to ask you about and then obviously, whatever you want to talk about. So pi Carolina's you've been involved? Try and work around that. Yeah. Yeah. What's the context for sure.


Andrew Knight  36:42  

So a little a little bit of history. There's only ever been one pi Carolina's 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. Calvin Spielman was the chair iron for On Twitter, then his life changed never happened again, Soviet. 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 max point was one of the top level sponsors. It was here and Research Triangle Park. IBM was the main sponsor of it, there were like, three, four, maybe 500 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 of Python conferences, and you always get at least one so boom, and nobody else really submits for them. Don't take my secret. But anyway, making notes. I really, really got involved in the Python community starting in 2018. This one is polka Python the first time it's when I went to pi, Ohio. pike pike on Canada just I've been addicted to these things. They're going all over the world for Python conferences. But at pi con 2019. I was thinking to myself, you know, be really cool if we had a, 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. I'm like, Okay, well, I guess I'm, it's a democracy. So I might as well try to make this happen. So I went to an open space for 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 comes up to me afterwards, it's like, hey, Andy, do you want to announce a call to action to get a pie Carolina's going tomorrow on stage in front of like, 1000 people? And I say yes, because I just don't know. I'm so excited at the time. So I get up on stage and I make the call to action. Please help me get this pie Carolina's thing going. I got in touch with Calvin I met him. And so yeah, if we leave Trying to get it going. But it's been a little bit tough because life Well, I'm already super 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 20. We'll see with coronavirus how that goes. I'm looking at it's going to be somewhere between 102 hundred 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, no official call for proposals, no big review committee not looking to have like a huge Expo area. Basically it's going to be lightning talks and open space and collab clusters. Then we'll have maybe a few sponsors. You know, somebody for lunch, Red Hat is our sponsor for the venue, that kind of stuff, keep it keep it small so that if we need to postpone it, it'll be easy. Right? So that's kind of the vision we have for pi Carolina's right now. 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 developed it using flask with Zappa and Amazon Web Services so that it's all serverless just kind of push it out there and boom


Will Vincent  40:36  

you're a madman.


Carlton Gibson  40:37  

Yeah, tell me about it. Cuz cuz spinning up an easy to instance was too hard. Well, no, I'm joking. Oh, dude. I mean,


Will Vincent  40:44  

I'm admiring you. I mean, Zappa is one of those things, too. I see talks, and I briefly tried not just like, oh my god, like until I have to, I won't, but I mean, it's, it was really easy getting getting the thing out there just as a function.


Andrew Knight  40:55  

I mean, I have the development one out there just to really open your row. The only thing that I haven't done yet is connected to the PI Carolina's dot org domain. That's one of those things where I'm just like, don't have time right now.


Will Vincent  41:06  

It's been about a week. What do you want to do that before we launch this episode, we'll, we'll put a link to we'll put a link to one of them in the show notes. These are the official, I'll get on that. So that's one of the things about web that I just, yeah, every time I have to just grip it. So I'm dealing with DNS, it's I don't know, it's horrible. It's like it's got 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 earlier like


Carlton Gibson  41:44  

you know, you got you've got a day long TTL and you type one character wrong and you hit submit and you've it's like no




Will Vincent  42:01  

I'd even just custom domains like I had a whole chapter in my my Django 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 Heroku is I don't know could be clear and yeah I just like I just it's a shame though because even for me right like you know it's like every year or two I'm like how do I do this? Yeah. So so many things I understand it takes it's not just like flipping the switch. Yeah.


Andrew Knight  42:31  

So I'll get on that.


Will Vincent  42:35  

Well, is there anything else you want to mention or plug as we wrap up here so your your automation panda on Twitter, you're active there you have your website? What's the best way for someone to get in contact with you if they have


Andrew Knight  42:47  

Yes, sir. If you need to get in contact with me, I would recommend either Twitter at automation panda. You can go to my blog, automation there's a contact form in there. Or if you happen to be at your local Python calm Maybe I'll be there to Django con is going to be in October this year, right? In


principle is which one? us one?


Yeah. Django con us. Sorry.


Will Vincent  43:11  

That's the plan. Okay. San Diego as well. Yeah.


Andrew Knight  43:13  

Yeah. I'm hoping, hoping to come to that one, but we'll


Will Vincent  43:17  

see. And Django con Europe has been rescheduled for September. And currently, I mean, you know, all these plans are dependent on, you know, the coronavirus, obviously. And we'll see how that goes. I may be quick shout out on Django news. I run a newsletter, Django dash news calm that has weekly news on Jango, including updates on conferences, and things like that. So that's a good resource for people if they're not aware of it. Well, Andy, thank you so much for taking the time to come on


Carlton Gibson  43:46  

the show. Really, really interesting. Thank you.


Andrew Knight  43:49  

Thank you for inviting me. This was a lot of fun.


Will Vincent  43:51  

All right, and everyone. We're at chat Django on Twitter and Django See you next time. Bye. Bye.


Andrew Knight  43:57  

Thank you. Bye