kapix / polyglot Goto Github PK
View Code? Open in Web Editor NEWTranslation system for Haiku's catkeys, tailored for translating apps from different authors
Home Page: https://i18n.kacperkasper.pl
License: MIT License
Translation system for Haiku's catkeys, tailored for translating apps from different authors
Home Page: https://i18n.kacperkasper.pl
License: MIT License
It'd be nice if Polyglot had a dark mode for those who prefer using dark mode - Haiku's website has dark mode and nephele is working on dark mode for our documentation so it'd be nice if all of Haiku's websites/web apps eventually had dark mode.
Thanks!
Some apps have several catkeys for different parts of the software, like for the main "Application", a "Library" or "Tracker-addon". Here you can add those different sub-projects.
Normal, "single-projects", should be named "Application".
While it should be obvious which column is for the original and which is for the translated text, adding a title above those text boxes may be a good idea. Should be the same as on the actual Glossary index page. There it is now "Text" and "Translation".
Maybe those can be changed to "Original text" and e.g. "Polish translation", to make add another indicator in which Glossary we are.
IMO it would be OK to automatically always create all available languages when adding a project.
People come to add new translations, and will first have to contact an admin to add it, if it's missing.
In fact, as soon as a new language is added in the Polyglot settings, it should be added to all existing projects as well.
janus is "Administrator" for Slayer, as he added the Slayer project after I upgraded his Polyglot role to "Developer". He tried to upload an updated en.catkeys for Slayer, but got the "Whoops, looks like something went wrong" error.
I, OTOH, had no problems uploading the new Slayer en.catkeys.
I just added Vision to Polyglot and uploaded the en.catkeys. That worked well.
Then I tried uploading the existing de.catkeys and uk.catkeys. Here I keep getting the error "The catkeys must be a file of type: text/plain.
". I made sure the de.catkeys are text/plain.
The en.catkeys and uk.catkeys are locale/x-vnd.Be.locale-catalog.plaintext (saved from CatKeysEitor I assume).
I uploaded a zip with de and uk at https://0x0.st/stV0.zip
I'd be nice to have a little widget (maybe a "X" or "Clear" button) to clear the search/filter view.
After you enter a search term and press RETURN or click the Search button, the view changes to show only the matching blocks. If you want to go back to the unfiltered view, you have to manually clear the search text field. If you're distracted and forget to hit RETURN/click "Search" you're wondering why you still have a filtered view.
The widget could indicate if the current view is filtered by being disabled when the view is unfiltered.
Saves having to export each language individually.
Currently it seems that Polyglot doesn't have a favicon on display in the tab, maybe it would be good to add one (maybe the image of the Y with the globe and flags), perhaps using a tool like this?
Thanks!
If a project has several 'modules' - like Pecorename (Application and Add-on) - you cannot export all/finished catkeys for the whole project. It errors with:
There are duplicate file paths. Cannot generate an archive.
Maybe create the two "locales" folders in subfolders named after the modules before zipping it all up.
With all those languages we now have, many will stay empty and only make the list of translations long.
Add a "Show only active translations" chackbox to flter out the empty ones.
The profile page of a user should show which language permissions a user has. If there aren't any yet, it should say to contact the admin to get them. I suspect that some of the users don't know why they can't translate anything and just don't come back...
For example:
Lanuguage permissions: none
Please contact the administrator to be able to start translating.
Ideally the "contact" should link to a mail contact form. Send 'em to me. :)
Add a paragraph, light grey background to be more promiment, with:
"For strings that don't need translation, because they are the same as the English original, the "Needs work" checkbox should be unmarked. Otherwise the percentage display on the overview page doesn't reach 100%."
If you need a flag for friulian language for the supported language list:
https://it.wikipedia.org/wiki/File:Bandiere_dal_Fri%C3%BBl.svg
directly here:
https://upload.wikimedia.org/wikipedia/commons/8/87/Bandiere_dal_Fri%C3%BBl.svg
It seems to be "cz" currently. When uploading catkeys, it says "Upload cz.catkeys".
I didn't find it when TextSearching the code, or I'd created a PR.
Catkeys need to end with a new-line, otherwise "make bindcatalogs" fails with
couldn't load source-catalog locales/en_GB.catkeys - error: General system error
At least that's what I suspect is wrong with the Swedish catkeys of StreamRadio, see https://i18n.kacperkasper.pl/files/34/lang/11 . The block for "Usage: StreamRadio..." has an empty first line in the Swedish translation. That seems to get exported and makes the sv.catkeys have "Bad data".
Since users may notice typos etc. to report while translating, having the links to the project's website and bugtracker at the top of the "Translation" page (and maybe also the "Translation modules" page) would be nice.
Can they be added to the 'breadcrumb' at the top? Otherwise maybe a new block with a bit larger icon, name, link symbols.
I was wondering how translators and developers could stay uptodate on the state of translations.
Maybe having 2 RSS feeds would be a nice way:
Showing a list of all languages and the projects that are >0% && <100% for those:
Incompletely translated projects:
Showing a list of all projects and the languages that are >0% && <100% for those:
Incompletely translated projects:
Or is there a better way? Having feeds for each language and each project seems exessive...
Current translation block:
Would be good if there was a button at the bottom of the list of translations to complete to load more translations - the idea of having to reload the page to load more translations might be a bit odd for users and it's more intuitive to have a button at the bottom to do this.
Thanks!
If the list of available projects on the starting page had after each project a list of languages that are active (>0%) but incomplete (<100%), one could quickly spot which projects' languages need work.
That way one can also quickly see which formerly "complete" projects must've gotten an update.
E.g.: Clipdinger (Needs work: de, fr, it, uk)
The text in brackets in grey instead of black, but IMO much better would be to use 16px flags instead. You'll spot your country's flag much quicker than parsing text abbreviations.
(Should the layout change as in #16, this could be in a 2nd column "Needs work".
BTW, the term "Needs work" is a bit awkward here, but it does fit well with the checkbox in the translation blocks. Therefore I'd stick to the term wherever it appears to avoid confusion.)
Probably a bigger fish...
It would be nice if each language had a list of default translations for the standard stuff, like OK, Quit, Close, Abort, Cancel, Defaults, Revert...
Would cut down work and increase consistency.
This would have the sorting of the languages as the catkeys files are in the "locales" folder in Tracker. Add a nice flag to make it pretty. (I could create the PNGs from out flags icons and make a PR, if you want :))
Bardzo ciekawie wygląda. Bardzo dobry pomysł.
Czy jest możliwość wprowadzenia sugestii i dyskusji?
Na stronach https://tatoeba.org/pol/ (swoja drogą polecam i może nawet zastanowić się nad integracją) są komentarze do każdego tłumaczenia. Czasem to pomaga, bo autor często sam by zmienił, a ktoś może zostawić wiadomość.
Można by też zrobić sugestie anonimowe by bez logowania ktoś mogl zostawić informacje dla tlumacza. Niestety od razu może pojawić się spam.
Czy jest gdzieś jakiś sposób by zintegrowac to z własnym oprogramowaniem? Powiedzmy, ktoś ma swój program i chciałby postawic u siebie tłumaczenie
Currently the languages are sorted by their ISO code. That puts e.g. Dutch way down in the list (nl). Would be nicer when sorting by language name instead.
Hi,
In the Edit Profile screen I wasn’t able to find Asturian as a preferred language. Could you add it, please?
I was wondering if there could be links to other things that may need translating for an app. Like documentation or data files (recently I stumbled over the tips file for Tipster).
Either as links back to the project's page (there could be several files tat need translation), or maybe even as uploaded ZIP archive (with a reasonable limit on size).
I've attached Polyglot_documentation.zip that contains htmlified docs for translators, developers and an index page that doubles as about page. It contains part of the css I usually use for docs, just to make it less bland.
I think it's better to put into this ticket than mailing stuff around.
As the site changes, things will have to be updated, esp. the screenshots I guess. Once you "twig" the html, I should be able to PR those changes and everything you'd like to have improved.
Please have a look at the "Overview" section of the Help_dev.html to see if I got the gist right. I'm not really familiar with databases and the terminology could be off (speaking of adding "fields" for example). You may be able to express the workings more clearly than me...
No hurry, of course.
Sometimes, you come to a translation only to fix a typo. It's a contribution like another but now your name replaced the one of the person who did 99% of the job on Contributors list.
Perhaps renaming that list to Recent Contributors would be better.
What could be done is to list on a page all contributors for a specific language. It could be on per language progress page that I suggested on another ticket.
Also if the file mention translators, it should say 'Translated (to ...) by Polyglot community' to avoid the problem. Though that may not always work for existent apps, it could be an idea of generic line for new ones.
This used to work until recently.
See the forum thread https://discuss.haiku-os.org/t/help-translating-applications-with-polyglot/6548/8 :
I can enter into the site, but when select one of the different apps available from the list, I get the message: "Whoops, looks like something went wrong."
To make it more obvious when scrolling down the list of untranslated strings. Italics are easily overlooked. Maybe yellow, like the fuzzy's at the userguide site?
I'd like to translate to Friulian language. Can you add it to the translatable languages
Regards
Polyglot should track changes to all texts and allow developers and admins to see those changes.
The "Edit" and "Translate" pages show smaller margins than all the other pages:
E.g.:
https://i18n.kacperkasper.pl/files/2/lang/1
https://i18n.kacperkasper.pl/files/2/edit
Especially if the catkeys of a project is very large and the strings span many pages, a method to find a particular string would be nice. Like looking for a particular user in the "User" part of Polyglot, a text box to filter all strings of the current project would be very welcome.
I don't think distinguishing between original/comment/translation is needed.
I tried uploadeding ja.catkeys for QuickLaunch, but the text in the right column stays English.
At the moment it's a bit time consuming to find a specific user to grant permission for a language. Most of the time, this is done soon after the user registered, so he'll be on the last page. If you have to find someone to add an additional language, however, you'll have to start searching from page one onwards... :)
Instead of a search function, maybe even better: a text field for each column on the "Users" page to filter that column. That way you could also search for email or language permissions.
The list of preferred languages of a user's profile are sorted after the language code, not the natural name, e.g. "Dutch" is "nl" and is therefore placed quite a way down the list.
The page https://i18n.kacperkasper.pl/languages already sorts correctly.
To quickly filter what's still left to do.
Had this problem with Paladin and had to write this tool to spot the issues:-
https://github.com/adamfowleruk/CatalogTester
If the key had trailing spaces, but this was removed, Polyglot doesn't detect the change and leaves the spaces in the key. This causes the generated catkeys file to fail on linkcatkeys.
Same issue if the key text remains the same except for a capitalisation change on one of the letters.
The en.txt in the above repo is exported from Paladin, the de.txt from polyglot is manually fixed using pointers from my tool (so it correctly identifies all issues), and the it.txt from polyglot is there to show one that fails the fingerprint check.
As mentioned in HaikuArchives/BePDF#79 (comment) , comments don't seem to be visible in MacOS' Safari browser.
Whilst I'm translating, it would be good to know the overall translation progress of the application I'm translating, perhaps by displaying a progress bar at the top similar to the ones that show up for all the translations when you click on an application.
Thanks!
Instead of having to click on "Edit" to the right of the file name (e.g. "Appplication") to upload the en.catkeys, jump right to that page automatically. Or do the upoading of en.catkeys in the same page.
Here are a few ideas for consideration when time allows.
Material-icons top right: help, settings, login/profile
The list of available projects shows meta data: 32px icon, icons to link to project website and bugtracker.
Flag of current language at top right.
As described in #15.
Would be good if Canadian and Australian English were added to Polyglot.
I note that Canadian English is present in the Polyglot profile, where it appears in the "Preferred Language" selection list, but it doesn't seem to show up as a translation to complete when clicking on an application to translate?
Thanks in advance!
When creating/editing a project's en.catkeys ("Application | Edit") additional data could be added:
The icon can then be used whereever here's currently only the project name. This can help not to get confused, if e.g. there are several slightly similarly named projects, like "PecoRename" and "PecoBeat".
The URLs can be added to small icons after the project's name, to give quick access, e.g. if a translator found a typo. Add a tooltip to those icons "Project's website", Project's bugtracker".
Here's a mockup:
When I have time, I come to see if there's something new to translate to French but since it isn't often I don't remember what apps were already there or not. I don't see either if a good soul has finished what I started on a particular app. For the moment, list of apps isn't long so it isn't a big deal and as regular user we could do with it.
Now, imagine you're one of these good souls. You register and arrive to the app list for the first time. You check first the app that you came for, job may already been done. Second thing, you will try are the two first apps on top of list and if translation is done also here, you may because you're in a good mood try another on bottom of list with same luck. You will quit there thinking nobody needs your help.
So I suggest a page for each language showing translation progress of apps.
Having the "fingerprint" ID of the currentla uploaded en.catkeys file displayed on the "Edit" page of a project would be nice to keep track if everthing's uptodate with what's in the project's source repo.
It seems the "Export all" link to get a ZIP with all catkeys of a project is only visible to the owner/admin of that project. At least Diver doesn't see it for KeymapSwitcher.
I suppose the "Export all" link can be useful to anybody, even unrelated to the project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.