Welcome to the new MegaTokyo Forums! The old forums are available (in read-only mode) at http://archive.forums.megatokyo.com.

Volunteer Request - PHP Programmer

Moderators: Invisigoth, chemi

Post Reply
User avatar
paarfi
Super Mod
Super Mod
Posts: 607
Joined: Sat Jun 03, 2017 5:32 pm
Location: south-central Pennsylvania

Volunteer Request - PHP Programmer

Post by paarfi » Tue Oct 22, 2019 7:48 pm

I'm sure most of y'all are aware of the https://www.megatokyo.it/ site that hosts fan translations of the MT comics in various languages. Most of those were done years ago, but cidjen has been working to get the Polish translations up-to-date with the latest comics. Unfortunately, the MegaLettering engine that supports translations is partially broken.

MegaLettering is the PHP engine created to manage the Italian translation of www.megatokyo.com, but it is written with general use in mind, so it can support any number of languages. Text in balloons can be translated by using a MySQL database that defines both the balloon shapes and the translated text and fonts to use to add new text.

As I understand it, the ability to assign translated text to the dialogue balloons works, but the ability to define the dialogue balloons is currently broken. As a result, cidjen has had to stop at comic 1361, which is the last comic for which those balloons had already been defined.

The MegaLettering engine was written many years ago by Lapo, who also kindly maintains the https://www.megatokyo.it/ site itself. Lapo has been meaning to try to fix the MegaLettering engine, but he has found himself just too busy anymore to manage it, which is totally understandable.

So we are looking for a volunteer who is good with PHP and willing to help the MegaTokyo community by taking a stab at fixing this. If you are interested, please reply here or contact me via PM or email.
Proud owner of kendermouse's 500th post.
Lean and slippered forum loon

garapagosu
Posts: 93
Joined: Sun Jun 04, 2017 7:19 pm
Location: Japan

Re: Volunteer Request - PHP Programmer

Post by garapagosu » Thu Oct 24, 2019 11:21 am

I'm not sure if this is the current version running on the site, but an example of what you'd be working with can be downloaded from here:

http://freshmeat.sourceforge.net/projec ... lettering/

A bit of Italian here and there, some magic with drawing boxes... neat stuff.
Image

User avatar
GouryG
Posts: 64
Joined: Sun Jun 04, 2017 7:19 pm
Location: Lehigh Valley, PA

Re: Volunteer Request - PHP Programmer

Post by GouryG » Thu Oct 24, 2019 9:01 pm

The link appears to be bad. The screen says DB error
No Matter Where You Go, There You Are

garapagosu
Posts: 93
Joined: Sun Jun 04, 2017 7:19 pm
Location: Japan

Re: Volunteer Request - PHP Programmer

Post by garapagosu » Thu Oct 24, 2019 10:20 pm

Strange. I just loaded it on my phone with no issue. Let's try again in plain text:

freshmeat.sourceforge.net/projects/megalettering/
Image

User avatar
darrin
Posts: 529
Joined: Sun Jun 04, 2017 7:19 pm

Re: Volunteer Request - PHP Programmer

Post by darrin » Fri Oct 25, 2019 12:23 am

I was able to follow the link and download the code (thanks garapagosu :D). It is only a collection of .php files however, without a readme or other instructions. I assume these files are incorporated in a site somewhere for translators to use to edit images and add bubbles and text to them.

Maybe cidjen could weigh in and describe how the system works for translators submitting text and picking bubbles? It might help give a clearer picture of how things fit together.
Avatar by Broken, I changed the book
My rescripts, now with little bits of commentary for each one

User avatar
cidjen
Posts: 849
Joined: Fri Dec 29, 2017 12:13 pm
Location: Too many to fit in this margin area
Contact:

Re: Volunteer Request - PHP Programmer

Post by cidjen » Fri Oct 25, 2019 6:05 am

Hi, this might be a bit much to convey in a single post here, so I'll try to describe best I can (I can make screenshots tomorrow and put into my imgur account for better explanation, but for now I'll just describe)

so after logging in, there is the language selection (a big page with flags, path in browser shows no name so i guess it's the 'index.php' or a default index file).

After selecting a language here, it goes to the editor.php page.

All the pages after the index have the same 'page header'.
This one has 'tabs' with links to 'main' (the editor, editor.php), 'characters' (who's who, characters.php), 'styles' (font manager, styles.php), 'console' (rant manager, console.php), 'links' (link manager, links.php), 'about' (the crew, about.php)

Below that on the editor.php page, is the language selector (entries in the drop down show language name and encoding).

Normal 'translation' mode shows the 'browsing' header, under which you can select a strip, turn debug on/off, turn balloon edit on/off and lock/unlock.
(I never used any of these other than selecting a strip)

Under 'This Title' header there are some settings concering the currently selected strip. They can be edited and updated. The stip ID number is already set when the image is imported (I think) so I don't touch that.

Underneath there is 'this balloon section that shows nothing, if no balloon is selected for editing.

To the right of 'this title', 'this balloon' section, the image of the strip with overlay showing where the balloons are, is being shown.

When a balloon is selected for editing, its selected area is shown coloured blue (unselected is shown red) (the areas are semi-transparent so the image can be seen under the selection)

When I click on one of the red marked areas, the 'this balloon' section is updated with info of the balloon (read only - which panel, which character, editable - the 'center' of balloon, and below: alignment option of the text and the content area).

Content of text to be written in the selected area, is to be entered into the text box under 'this balloon' when a balloon is selected.

One can also click 'edit' under that section to reveal more info saved about the balloon (lets one edit the panel number, balloon number on the page, set the shape (in case of existing balloon only shows its kind of shape on a button to click)

Below there would be a text field to enter balloon coordinates (pairs of x, y coordinates are being added with mouse click when the image is clicked even if the strip can't be seen).

Below there is the drop-down to select 'who is talking', fields to gather bg colour, fg colour, center (with the 'middle' button to probably automatically select within the cloud of coordinates entered), buttons to select text alignment (left, center, right).

There are 'trim', 'update', 'delete', 'cancel' and 'reset' buttons when the balloon editing mode is on; in normal 'translation' mode, there are 'edit', 'update' and 'reset' buttons. 'edit' switches to balloon editing mode, 'cancel' moves back to translation mode. reset reverts to values previously saved. I don't know what 'trim' does.

Above the strip image section, there is navigation bar, pretty standard options, first, previous, date select (never used that bc i think it wants the date be entered manually and I'm too lazy for that - it refers to the translation publication date actually, not original strip pub date), next, last.
Nav bar buttons only move in the range of strips that are translated in the given language.

(to be continued)

User avatar
mistersaxon
Posts: 48
Joined: Sun Jun 04, 2017 7:19 pm
Location: Thame, UK
Contact:

Re: Volunteer Request - PHP Programmer

Post by mistersaxon » Fri Oct 25, 2019 6:23 am

It'd be good to know what the error is, as well. Resolution might be as simple as a tag missing from a strip making it ineligible to have balloons added or it might be a major structural d/b issue.
Yea, verily: Who is that, running on the steppes! It is Sax, clutching buzzsaw hand extensions! He howls homicidally:
"I'm seriously going to pound you into the fast lane!!!"

Oh, yeah, I wrote Ping some backstory once.

User avatar
cidjen
Posts: 849
Joined: Fri Dec 29, 2017 12:13 pm
Location: Too many to fit in this margin area
Contact:

Re: Volunteer Request - PHP Programmer

Post by cidjen » Fri Oct 25, 2019 6:41 am

(continued)
So I described the basic of page layout previously, now for the process of editing.

When I land in the editor.php page, i normally land on last published strip by date of publishing, even if it isn't the last of what's been translated.

I then change the language in selector to English - it will have the strip ID remembered so it shows me the same strip as I landed on in my language.

Then I use the strip selector drop-down, or the nav bar, to select a strip.

Then I change the language to my own again.

If there was no information in my language entered on that strip yet, I can fill it in (title and when I want the strip to publish) (yes it supports scheduled publishing, it publishes strips on 00:00 UTC non-timezoned on the date selected).

(there is a bit of a bug - when title is entered into the title field, and update clicked, the title does not appear above the image straight away, only after next operation, e.g. clicking on a balloon).

Clicking on a balloon selects it (changes the overlay colour from red to blue) and shows the text field to enter the balloon text.

Text is to be entered there and after that I click 'update'.

That is, if all you need is the default font...

If you need something else than default, take a peek into the 'font manager' page - it lists the style names. Normal style is 7.50 pt Comic Book font. You can click on the preview button next to the font to see what it looks like. There are a lot of fonts predefined on that page.

Back to the editor, to make the text change style to what you want, you need to prefix it with a tag like $<normal>.
So for bold normal font you'd use $<normal_bd>.
There are no closing tags (or I haven't seen them being used?) so to revert next part of text to normal, just insert the start tag again with $<normal>.

Not sure what kind of notation is that, but a sample would look like

$<normal_bd><Nie!
$<normal>I nie mo-
gą się o tym
dowiedzieć, nig-
dy, nigdy, $<normal_bd>prze-
nigdy!!!>

(above comes from strip 1185, panel 8, balloon 1, where Yuki cries to Yutaka to not tell her friends, never, ever, ever!!! that she's become MG)

After clicking 'update' on the this balloon area, the text shows in the overlay (there are times where one has to guess what's being printed there because the overlay does not cancel out the background - hence some typos are only found after the page is published, it's a bit of a bother, luckily it's not set in stone).

If one needs more complicated text alignments, tough cookies, you have to work with line breaks to make it to the form such that it fits into the balloon (it does not automatically wrap text to the shape of the balloon)

The translated balloon's overlay turns to yellow colour.

(Oh and the flag below the 'this balloon' in text editing mode, shows which language contains a translation of this balloon, it's handy, but not clickable, which is a bit of a shame)

There is another button under the 'this title' and 'this balloon' sections, in a section 'cached image', called 'force update' - it is to be used if I want to forcibly update an already published page.

When the strip is deemed ready to be published, all one needs to do is enter the publication date in the appropriate field (date format : YYYY-MM-DD);

(to be continued)

User avatar
paarfi
Super Mod
Super Mod
Posts: 607
Joined: Sat Jun 03, 2017 5:32 pm
Location: south-central Pennsylvania

Re: Volunteer Request - PHP Programmer

Post by paarfi » Fri Oct 25, 2019 7:18 am

I appreciate the curiosity and such, but we're not going to diagnose and fix this on a forum thread. If any of y'all want to volunteer to try to fix this, please PM me. I can get you access to the current source and the original developer.
Proud owner of kendermouse's 500th post.
Lean and slippered forum loon

User avatar
cidjen
Posts: 849
Joined: Fri Dec 29, 2017 12:13 pm
Location: Too many to fit in this margin area
Contact:

Re: Volunteer Request - PHP Programmer

Post by cidjen » Fri Oct 25, 2019 7:54 am

Sorry @paarfi :)
@mistersaxon, @darrin: I can't help with PHP but if you tell me what to do with Firefox Web Developer Tools like Inspect or something, I can try to get back to you on it) please email cid.jen@yahoo.com (i have sort of limited time for this and not everyday, but i can try to answer if there's questions I can handle.

Arent
Posts: 11
Joined: Sat Jun 29, 2019 1:17 pm

Re: Volunteer Request - PHP Programmer

Post by Arent » Sat Oct 26, 2019 9:31 am

Well, I could do that, but not for free. I need to pay my bills, sorry.

User avatar
paarfi
Super Mod
Super Mod
Posts: 607
Joined: Sat Jun 03, 2017 5:32 pm
Location: south-central Pennsylvania

Re: Volunteer Request - PHP Programmer

Post by paarfi » Sat Oct 26, 2019 10:38 am

Arent wrote:
Sat Oct 26, 2019 9:31 am
Well, I could do that, but not for free. I need to pay my bills, sorry.
Totally understandable.
Proud owner of kendermouse's 500th post.
Lean and slippered forum loon

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests