User talk:Ml31415

From Wikivoyage
Jump to navigation Jump to search

Hello, Ml31415! Welcome to Wikivoyage.

To help get you started contributing, we've created a tips for new contributors page, full of helpful links about policies and guidelines and style, as well as some important information on copyleft and basic stuff like how to edit a page. If you need help, check out Help, or post a message in the travellers' pub. If you are familiar with Wikipedia, take a look over some of the differences here. sats (talk) 10:18, 29 January 2013 (UTC)[reply]

Thanks for your helpful edits. Much appreciated. Ikan Kekek (talk) 09:58, 8 February 2013 (UTC)[reply]
Hi. I removed your panorama from the New York City guide, with an explanation in my edit summary that it is not OK for a photo to be wider than the page, and that reducing its width to fit on the page made its visibility insufficient to add anything valuable. I think you might want to be careful about those panoramas. They are fairly large files that scroll all the way across the page and will increase download times for travelers on creaky dialup connections in internet cafes in far-flung places.
Also, please have a look at Talk: New York City. I don't agree with your removal of all references to specific eateries in the New York City guide, but it is a defensible action, and it's worth having a conversation about it. Thanks a lot.
All the best,
Ikan Kekek (talk) 06:26, 9 February 2013 (UTC)[reply]

Tag converter[edit]

Oh, man, that tag converter is super cool. You made that? Super! If I were to give you the v-card attribute names, would you be willing to plug them in there to make a Portuguese version of this tool? Texugo (talk) 11:38, 12 March 2013 (UTC)[reply]

Sure. It needs some internationalization in general. I'm a bit busy with work stuff currently, but I'll definitely put it in!
Awesome, please let me know! Texugo (talk) 01:33, 16 March 2013 (UTC)[reply]
I notice you haven't been around for a couple of months. Are you still alive?
On pt:, we have done the background work in preparation for massive conversion of listings to a portuguese-language version of the v-card-type template called "item", and a tool like this is going to be indispensible to that endeavor. We have the same xml in English as everybody else, so you would just need to substitute the following into the vCard conversion to make what we need:
vCard item
see veja
do faça
buy compre
eat coma
drink beba
sleep durma
listing item
type tipo
name nome
alt alt
address endereço
directions direções
phone tel
email email
fax fax
url site
hours funcionamento
price preço
checkin checkin
checkout checkout
lat lat
long long
description sobre
sub-type does not exist - please omit
comment does not exist - please omit
intl-area-code does not exist - please omit

If you could find the time to do that for us, I would be eternally grateful. I would download the source code and do it myself, but I don't know anything about this kind of programming or toolhosting. Please let me know if you would be willing.. Thanks a lot! Texugo (talk) 12:26, 10 May 2013 (UTC)[reply]

Hi Texugo! Sorry, I was quite busy with work recently, but I'm still around. I'll update the converter with a portuguese version soon now. ML31415 Mail Talk 14:05, 10 May 2013 (UTC)[reply]

Fantastic! Could you please let me know on my talk page if and when it gets done? Thank you so much! Texugo (talk) 14:13, 10 May 2013 (UTC)[reply]
Hi. I had a look at that buzzword file, made some changes, and sent it to you in full text form in an email through the site here. Please let me know if you got it or if I need to send it another way and you can send me your actual email address.
I started translating the first section but stopped - we don't currently have any system of "sub-categories" or anything, so I think this functionality (and it's corresponding attributes) can be left out. Further down in the document, I did change the list of abbreviations and the buzzword associated with the individual fields (address, phone, price, etc.). I did not change any of the code outside of quote marks in the lists of buzzwords. Please let me know if I did it properly or if there is anything further I can help with. Thanks again! Texugo (talk) 15:09, 10 May 2013 (UTC)[reply]
Wow, great work, it's getting there. Thank you! Just a couple I want to bring up for the moment:
  • when someone has front-listed a link, the extraneous title text ought to be tossed out, otherwise it just breaks the link
  • instead of {{vCard |tipo=... }} we would like the type to be the name of the template:
  • {{veja |nome=...}} (for see)
  • {{faça |nome=...}} (for do)
  • {{compre |nome=...}} (for buy)
  • {{come |nome=...}} (for eat)
  • {{beba |nome=...}} (for drink)
  • {{durma |nome=...}} (for sleep)
  • {{outroitem |nome=...}} (for listing)
  • I also notice that when someone has used parenthesis in a phone number: (+39) 5555 6666 it keeps only what was in parenthesis and throws out the rest...
Do you think these changes possible? I will get you a better list of buzzwords this evening when I have more time. Thanks so much again! Texugo (talk) 19:39, 15 May 2013 (UTC)[reply]
For your first point: Can you please give some specific example, what you have typed in. I'm not sure what you mean with 'front-listed'. The name of the tag can be changed easily. The fixing of the number recognition, too. ML31415 Mail Talk 19:54, 15 May 2013 (UTC)[reply]
Sure. When the source listing has [http://www.example.com Exampleland], it feeds everything in brackets to the url field, which results in a link that does not work. It should throw out "Exampleland" and just use the url. Complicating things a little, when such a link is the first thing in the source after the asterisk, that title text should likely go in the "name=" field, rather than be thrown out. Texugo (talk) 20:01, 15 May 2013 (UTC)[reply]
That link you sent me to the buzzword code seems to have changed. Could you send me a link to the current location of the buzzword stuff? Texugo (talk) 01:16, 16 May 2013 (UTC)[reply]
Sure, look here: [1] In the English file, there are the words that need translation, in the Portuguese file there is already a partial translation, which needs to be extended. Words, that are the same in English (TV, wifi, ...) can be omitted, the English words are used anyways for classification. When you find further classification errors, for me it's the best, if you copy the full misinterpreted line (like the stuff with the link in the beginning of the line), so I can add it to my test cases. ML31415 Mail Talk 11:38, 16 May 2013 (UTC)[reply]

Another thought[edit]

Just another thought, and this is probably just a wild dream, but here goes... I have been working to create additional buttons for the editbar above the edit window, which will insert the corresponding listing templates. You can see what I mean by copying my User:Texugo/common.js file to your common.js file and having a look at the edit screen. Anyway, I was just thinking how super awesome it would be if we could make another button there which would make use of the unformatted-listing-to-mediawiki-listing aspect of your conversion tool in the following way:

  • user highlights a section of unformatted listings and clicks the button
  • highlighted text is submitted to the tool
  • tool returns the converted code and replaces the highlighted text with it

Like I said, I was just dreaming and have no realistic idea how possible or how difficult this would be to do. But it sure would be awesomely helpful if it worked. Then we wouldn't have to copy things to the tool, convert them, and then copy them back. Is this a ridiculous idea? Texugo (talk) 03:05, 17 May 2013 (UTC)[reply]

Why should improving the ease of use be ridiculous? Actually it would be quite easy. The only thing you have to do, is to send a HTTP POST request to the converter, just like the browser does, when you hit the "Parse" button. I never worked with JS, but in general this is a quite basic feature. I can also add a option named "plain", so you wouldn't have to parse the output text out of the HTML response (the whole answer, which you currently see after clicking "Parse"), but only get the plain parsed text instead of HTML. ML31415 Mail Talk 06:21, 17 May 2013 (UTC)[reply]
Well, I suppose that is good news. Unfortunately I am an absolute novice about javascript and only managed to make the buttons so far by fiddling for hours with a sample script given here. Whatever code necessary to implement such a tool button would have to work within the confines of mw:Extension:WikiEditor, which has somewhat incomplete documentation, and while I do imagine it is fully possible, it is way way over my head unless I can find a sample script of something fairly similar. I don't suppose you would be willing to look into it? Texugo (talk) 12:12, 17 May 2013 (UTC)[reply]

Further refinements[edit]

Doing some further testing...

English[edit]

The English version needs similar changes, where instead of {{vCard |type=... }} it should be:

  • {{see |name=...}}
  • {{do |name=...}}
  • {{buy |name=...}}
  • {{eat |name=...}}
  • {{drink |name=...}}
  • {{sleep |name=...}}
  • {{listing |name=...}}
The English version should also omit the following fields:
  • subtype=|
  • intl-area-code=|
  • mobile=|
and include the additional field:
  • tollfree=|
Texugo (talk) 13:25, 17 May 2013 (UTC)[reply]
Do you have a reference for that? The last thing I read about that was, that they want to stick with the html-like tag format. ML31415 Mail Talk 13:50, 17 May 2013 (UTC)[reply]
The consensus here seems to be that we want to do it as above and use the seven templates above to automatically insert the type attribute and refeed it to {{listing}}, to avoid having people add listings without filling in the type field. Texugo (talk) 13:58, 17 May 2013 (UTC)[reply]
Should be fixed now. ML31415 Mail Talk 15:41, 17 May 2013 (UTC)[reply]

Portuguese[edit]

Some things I have found with the Portuguese version:

  • Unlike the English version, the pt version returns only the attributes which have content and leaves out all the others. It should include all of them, whether empty or not.
  • If the listing title in the original unformatted source does not have bolding around it, the conversion returns nothing at all. This example:
  • Hotel Luver, Av. Brasil, 3222 (saída km 321), +34 1234 5678, email:california@exemplo.com, www.hotelexample.com. Quartos bonitos com ar condicionado.
returns only an asterisk. This is a problem on the English version as well.
  • This example:
  • Restaurante do Zé, Rua Brasil, 351 (do lado do posto), +34 1234 5678, ze@exemplo.com, www.test.com.
returns this:
* {{outro| nome=Restaurante do Zé| endereço=Rua Brasil, 351| tel=+34 1234 5678, ze@exemplo com| site=http://www.test.com.| sobre=Do lado do posto.}}
which has a few problems:
  • should be "come" instead of "outro" (may be fixed once the new buzzwords are added)
  • "do lado do posto" should come under direções instead of sobre. This may be fixed by the buzzwords too, but in general anything in parenthesis just after the address should go in the directions field.
  • the email is showing up in the phone field. This works properly if the source text has "email:", but in both cases (and on the english version too) the dot is left out before "com"
  • This example:
  • Hotel California, Av. Brasil, 2111 (saída km 321), +34 1234 5678, email:california@exemplo.com, www.hotelexample.com. Quartos bonitos com ar condicionado.
returns this:
* {{durma| nome=Hotel California| endereço=Av Brasil, 2111| tel=+34 1234 5678, email:california@exemplo com| site=http://hotelexample.com| sobre=Www. Quartos bonitos com ar condicionado.}}
which has a few problems:
  • email still shows up in the tel. field, still without the dot
  • the www. has been taken from the url and put at the beginning of the description section

I hope these examples help. I will let you know of anything else I find... Thanks! Texugo (talk) 13:48, 17 May 2013 (UTC)[reply]

Another one:
  • This entry also returns only an asterisk.
  • Old Ukrainian Youth Hostel: Na rua Lepkogo 12(Лепкого), Telefone: +38 (0)322 727 611 Localizado no centro da cidade cerca da universidad de Lviv (Universidade Nacional Lviv de Ivan Franko). Um Hostel novo desenhado no estilo de uma casa ucraniana com 20 camas. Incluem-se gratis o internet, wifi, mapas, informação turística, linhos, toalhas e café/chá. Hai serviço de lavanderia (1 Euro). Fala-se espanhol, ucraniano, italiano, inglês e russo. Camas de 6,99 euro.
Texugo (talk) 14:29, 17 May 2013 (UTC)[reply]
Well, there will probably countless examples, where the parsing goes wrong. Actually it's a quite dumb system, using a bunch of thumb rules to guess, how to split a line and how to interpret the chunks. The problem with that is, if you fix it for one, it probably breaks some other, previously correctly recognized lines. Currently it's a quite time consuming thing to fine tune everything, so that all test cases work. So better don't expect to have perfect recognition, unless someone else picks up on it and helps improving the recognition in general. I'll fix the only-asterisk-bug for now, but for the other issues, my time is limited. ML31415 Mail Talk 14:56, 17 May 2013 (UTC)[reply]
I understand. Well, sure, do what you can when you can. What we've got is still way better than nothing! Texugo (talk) 15:33, 17 May 2013 (UTC)[reply]