wlc 1.0, a command line utility for Weblate, has been just released. The most important change is marking this stable and releasing actual 1.0. It has been around long enough to indicate it's stability.
Full list of changes:
Marked as stable release.
Added support for more parameters on file upload.
wlc is built on top of Weblate API, you can use it on Weblate 2.10 or newer, though some features might require more recent version. Of course you use it on our hosting offering. Usage examples can be found in the wlc documentation.
Weblate 3.4 has been released today. The most visible new feature are guided translation component setup or performance improvements, but there are several other improvements as well.
Full list of changes:
Added support for XLIFF placeholders.
Celery can now utilize multiple task queues.
Added support for renaming and moving projects and components.
Include chars counts in reports.
Added guided adding of translation components with automatic detection of translation files.
Customizable merge commit messages for Git.
Added visual indication of component alerts in navigation.
Improved performance of loading translation files.
New addon to squash commits prior to push.
Improved displaying of translation changes.
Changed default merge style to rebase and made that configurable.
Better handle private use subtags in language code.
Improved performance of fulltext index updates.
Extended file upload API to support more parameters.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
Upcoming Weblate 3.3 will bring new feature called alerts. This is one place location where you will see problems in your translations. Right now it mostly covers Weblate integration issues, but it will be extended in the future for deeper translation wide diagnostics.
This will help users to better integrate Weblate into the development process giving integration hints or highlighting problems Weblate has found in the translation. It will identify typical problems like not merged git repositories, parse errors in files or duplicate translation files. You can read more on this feature in the Weblate documentation.
You can enjoy this feature on Hosted Weblate right now, it will be part of upcoming 3.3 release.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
Setting up translation components in Weblate can be tricky in some cases, especially if you lack knowledge of the translation format you are using. Also this is something we wanted to automate from the very beginning, but there were always more pressing things to implement. But now the time is coming as I've just made first beta release of translation-finder, tool to help with this.
The translation-finder will look at filesystem (eg. checked out repository) and tries to find translatable files. So far the heuristics is pretty simple, but still it detects just fine most of the projects currently hosted on our hosted localization platform. Still if you find issue with that, you're welcome to provide feedback in our issue tracker.
The integration into Weblate will come in next weeks and will be able to enjoy this new feature in the 3.3 release.
wlc 0.9, a command line utility for Weblate, has been just released. There are several new commands like translation file upload or repository cleanup. The codebase has been also migrated to use requests instead of urllib.
Full list of changes:
Switched to requests
Added support for cleanup command.
Added support for upload command.
wlc is built on API introduced in Weblate 2.6 and still being in development, you need at least Weblate 2.10 (or use on our hosting offering). You can find usage examples in the wlc documentation.
Two years ago, I've taken over uTidylib maintainership. Two years has passed without any bigger contribution, but today there is a new version with support for recent html-tidy and Python 3.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
Weblate 3.2 has been released today. It's fiftieth release of Weblate and also it's release with most fixed issues on GitHub. The most important change is in the background - introduction of Celery to process background tasks. The biggest user visible change is extended translation memory.
Full list of changes:
Add install_addon management command for automated addon installation.
Allow more fine grained ratelimit settings.
Added support for export and import of Excel files.
Improve component cleanup in case of multiple component discovery addons.
Rewritten Microsoft Terminology machine translation backend.
Weblate now uses Celery to offload some processing.
Improved search capabilities and added regular expression search.
Added support for Youdao Zhiyun API machine translation.
Added support for Baidu API machine translation.
Integrated maintenance and cleanup tasks using Celery.
Improved performance of loading translations by almost 25%.
Removed support for merging headers on upload.
Removed support for custom commit messages.
Configurable editing mode (zen/full).
Added support for error reporting to Sentry.
Added support for automated daily update of repositories.
Added support for creating projects and components by users.
Built in translation memory now automatically stores translations done.
Users and projects can import their existing translation memories.
Better management of related strings for screenshots.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
As the end of this year’s Google Summer of Code approaches, this issue summarizes the work done during my project.
During my project’s development, I’ve refactored the existing Twig templates, my main strategy, when it was possible, was to reorganize the functions by putting all the logical part at the beginning, and the view’s at bottom, then I created a new template, and merged all of the templates that were being used in that function, this reduced a lot the number of templates. Another thing that was done was the refactor of Twig’s extensions, I’ve removed unnecessary functions, some were logic, others just returned a template and were replaced by an include statement, the extensions were named by following the following pattern Class_function_name, after talking with my mentor, we agreed to rename all of them to just function_name. I've fixed some bug as well.
The biggest contribution added by this project was to set a development pattern for the Twig templates that are used in phpMyAdmin.
By setting a directory structure pattern, removing unnecessary extensions and refactoring the existing templates, it will be easier to detach the front-end from the back-end, what will be done in the future, since there’s still a lot of html inside the php code.
Through this blog post, I’d like to comprehensively document all of my work done through the Google Summer of Code 2018. This involves links to all the blog posts, repositories, discussions and code merges. A huge token of thanks for all the support extended by mentors Deven Bansod and Maurício Meneghini Fauth and the entire phpMyAdmin community for their suggestions and discussions.
Webpack as a bundler to bundle the static javascript files.
Babel to allow support for module import and export and also to compile ES6 code to ES5.
Package.json as the package manager and yarn as dependency installer.
Dynamic imports to allow code splitting and lazy loading of JavaScript files as modules.
Reduce eslint warning and error in the modular code.
Jsdoc to document the javascript code.
Accomplishments and Leftovers: A large amount of codebase has been revamped till now. Major parts which are remaining are:
Some of the pages were giving error so they were not revamped like “Query By Example” page for databases and tables.
Database Designer is not revamped yet.
Gis Editor is remaining to be revamped.
RTE related pages are remaining to be revamped.
Error reporting for JavaScript files is not fully functional (Still working on it).
The code is functional now as the php code is edited in such a way to make sure the working of both old code and new code. Once complete code get revamped, then code cleanup for php files can be done to remove functions required for workability of old code.
Finally GSoC has come to an end and it’s been a great journey. I got to learn many new things and apart from honing my programming skills, I also learned quite a bit about Colour Theory which was a completely unknown domain for me.
As every good thing comes to an end, the summer vacations have ended and so did the journey of GSoC. GSoC helped me to spend my summers in a productive way.
I have almost completed project with a few remaining fixes and tests. One major problem faced recently was that many people use phpMyAdmin in /var/www/ folder which needs root access thus it doesn’t directly allows theme generator to create files without giving adequate permissions to the theme folder . So for now we have made a notification indicating the users to correct user permissions before proceeding. Another idea was to create downloadable files so that the user could manually add the custom theme to the theme folder. But this was quite a big task in itself, thus it’s been left as a later project.
After GSoC
The code hasn’t been merged yet as it still needs to be reviewed. As per the reviews of the users we could then improve the UI as for now we haven’t thought about UI much.
It has been more than two and a half months since working with phpMyAdmin under GSoC 2018. This week is the final coding week of GSoC. This blog post is a brief jouney about what has been done till now and what is remaining.
A substantial amount of code has been revamped and converted into modular code. Although it seems quite clear that the whole JavaScript code-base cannot be modularized before the coding period ends, as there are already some issues related to php which needs to be taken care before the starting of revamping the JavaScript files related to those php files so that the new code can be tested at least once in development.
Progress till now
Almost 70% of the code base has been converted into modular code. During the initial phase of the project, the created pull request became very complex to review ,suggest changes and to test for individual functionality, so the pull request was broken up into several continuous pull requests based on the individual functionality or file change. But these pull requests were in continuation, so at that time it was not sure that merging these pull requests will break something or not so I proposed to create a new branch in the main repository to merge all these continuous pull request and once the revamped code is tested on this branch, this branch could be merged into master to make sure that nothing is breaking into the master.
The prefix Mod_Js is for differentiating these pull requests from rest of the pull requests. All these pull requests were successfully merged into the gsoc-js-refactoring branch with some functionality break (mentioned in the individual pull request itself).
Plan for this week
The plan for this week is to revamp some of the files related to table into modular code. Apart from that, I am working on some build scripts so that the new code can be used in the production release. The code is being tested in production mode to make sure that nothing is breaking. I will also try to implement jsdocto create documentation of the JavaScript code.
Plan for next week
The next week is the documentation week for the work that has been done during the Google Summer of Code coding period. So the main focus will be towards documenting everything according to the guidelines mentioned by Google.
If jsdoc is implemented without errors and within the duration of the coding period, I’ll work on implementing better documentation of the functions, classes, and modules which can be hosted on phpMyAdmin developer page.
What’s remaining
The designer part of the phpMyAdmin is yet to be revamped. Apart from that some of the files related to the database like Routines, Triggers, Events, Query By Example are remaining. Some of the files related to the table are also remaining although I am working to revamp them.
Code cleaning, naming and renaming of files correctly are also few of the major tasks remaining. Old js files has not been deleted yet as the anticipatory changes made in all these old files will be considered after merging this gsoc-js-refactoring pull requests into master.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
This is my favorite feature request because of its importance and the challanges it imposes.
The data about add on features is stored in the configuration storage, when it is not configured, the data doesn’t persist over session. In those cases the data should be saved in browser local storage.
All this data(stored on client side) will be needed by the server, so we’ll need to pass the data to the server during login.
Whenever user makes some changes in the data, after processing it on the server side, it can be passed on to the client using ajax request and updated in browser local storage.
Plans for this week-
Automatically load settings from local storage at login time.
Implement an interface for interacting with these constraints
Update parser to understand this syntax
Update the export interface to allow including these in an export
Mysql does not provide any way to alter the definition of a constraint. The main idea is to add support for a constraint and additionally build a feature seperate from mysql to alter a constraint.
I’ve submitted the PR for the first part of the feature.
I’m currently working on the sql-parser.(The second part)
Work done -
SQL parser now recognizes CHECK statements in alter table commands.
Plans for this week-
Make sql parse fully aware of the CHECK statements.
Update the export interface to allow including these in an export.
Implement an interface for interacting with these constraints
Update parser to understand this syntax
Update the export interface to allow including these in an export
Mysql does not provide any way to alter the definition of a constraint. The main idea is to add support for a constraint and additionally build a feature seperate from mysql to alter a constraint.
I’m currenlty working on the interface to build, edit and drop check constraints.(The first part)
Work done -
Implemented UI to add a check constraint during table creation.
Implemented UI to show defined constraints on a table in table structure.
Plans for this week-
Finish the functionality to add/drop/alter constraints(first part).
As the second evaluations are starting from 9th July, I would explain all the work I’ve done between first and second evaluation. The first task I did was to create a feature so that the contrast ratio between the text colour and background colour is good enough. Detailed explanation about it is present in the previous post. The next work was to create Preview Panels and integrating them with the theme generator. Initially the plan was to create sample panels for every decided element, but I had to change the plan and decided to create preview panels for only Table and Group element. Every other style is applied on the already present elements (navigation panel, background, headers etc.). The two main reasons for it were
To prevent unnecessary clutter.
The already present elements were interfering with the sample elements, thus becoming a tedious and unnecessary job.
I’ve also written some documentation and will be writing some tests in a day or two.
I’m finishing the refactor in the directories that are already in the right structure, only the table directory is not ready.
I’ve been working on the databases templates directories, which I’ve finished a couple of weeks ago, and the server templates which I’ve finished last week, during this last one, I spent some reasonable time changing the tests for ServerEnginesController, to make it work with the new structure. There was a problem, at the test for the single engine show page, that the engine used for test is not so common nowadays, and I had replaced a function call for its code in the indexAction function, and where this function tests if the engine ‘Pbxt’ isValid(), which always returned false, because the engine pbxt is not installed. The old test bypassed this conditional by calling directly the getHtml function for pbxt engine. After a lot of failed tests, I’ve realized that the best thing to do for now was to keep the getHtml function.
Now all of my efforts are focused on finishing the tables directory, this is the directory with the biggest number of templates, 45 in total.
I’ve submitted a PR for the sixth feature.
Adds features discussed in #13023
Show ajax errors at the bottom of the page, instead of showing them in a popup.
Add copy query button for errors in processing sql queries.
Plans for next week-
The next feature(#7) that I’ll be working on is-
Add warning for default user/password usage
Don’t use the controluser ‘pma’ if it does not yet exist and don’t use ‘pmapass’ as password.
consider testing if pma:pmapass is used, and warn about it?
As my sixth week of GSoC with phpMyAdmin has come to an end, I going to explain the problems faced and how I tackled them. The biggest problem I faced was calculating text colours with contrast ratio greater than 4.5 , while keeping in mind the colour scheme used. First I tried to use mix-blend-mode but it didn’t work out because I would have to add a span class for every text, which wasn’t feasible. So I created a new function which takes the background colour and compares with the calculated colour . If the contrast ratio is less than 4.5 it tweaks saturation and brightness till the required contrast ratio is achieved. This colour is achieved with a maximum iteration of 10. Now I have started creating Preview panels and would complete it this week, hopefully.
It’s been 5 weeks now working with phpMyAdmin under the Google Summer of Codes 2018 program. I have successfully passed the first evaluation.
During these two weeks and including this week also, my main objective was to modularize the Navigation, Error Report, PMA Console, Import and Export and the configuration file so that the configuration of these pages can be checked and settings can be changed with the modular code.
Right now I am working on inline javascript coming from the php classes containing the the configuration of the particular page which were injected in the container showing the body of html. These configurations need to be imported in the module from window of document and then used in the modular code so that any change in the setting of the page or any saved setting can be compared with new changed or setting user is going to made on the settings page and on PMA Navigation.
Regarding the Feedback from Mentor:
As per the feedback, the mentors had given, I will try to push the quality code on the pull request by the end of this week or by the mid of the coming week after making successful changes and testing of the above mentioned files,which can be reviewed.
I’ll be adding a setting among other settings where user can disable the checkbox to disable drag/drop file functionality.
This setting will directly interact with the configuration file(just like how other configuration settings work).
There are some workarounds suggested by the users in the feature request page, I still have to figure out the safest and best among them, or, I’ll be finding out a workaround of my own.
I’m currently working on the fourth feature-
Before starting, I was thinking about showing a popup to add index when user tries to add AUTO_INCREMENT to an existing column. But in our conversations, Isaac and I decided to -
Automatically add PRIMARY KEY instead of showing a popup to add index.
Disable popup when user clicks on the A_I checkbox in column insert and new table page.
Weblate 3.0.1 has been released today. It contains several bug fixes, most importantly possible migration issue on users when migrating from 2.20. There was no data corruption, just some of the foreign keys were possibly not properly migrated. Upgrading from 3.0 to 3.0.1 will fix this as well as going directly from 2.20 to 3.0.1.
Full list of changes:
Fixed possible migration issue from 2.20.
Localization updates.
Removed obsolete hook examples.
Improved caching documentation.
Fixed displaying of admin documentation.
Improved handling of long language names.
If you are upgrading from older version, please follow our upgrading instructions, the upgrade is more complex this time.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
I’ve submitted a PR for the third feature -
Have set the default width for varchar fields in the insert page to cover the whole width of page.
I assigned a class to the “value” th element in the table, and styled it to cover the whole page.
Varchar and char textareas were also assigned a class to cover 95% of their parent elements.(width style overrides col attribute)
I have set the minimum number of rows to 7. It doesn’t need any relative value, as the height of this table mostly overflows the page.
Among all the enhancements in my list, the third one was the most minor one, all the others require relatively a lot more work and testing.
Plans for next weak.
Mentor evaluation starts 11th June.
I will be scrutinizing my work until now to test for bugs and for code optimization whereever possible and will be working on some issues.
This week I updated the code style to fit some of the PSR-2 rules, refactored some files and upgraded to Twig 2, in addition to helping the GSoC students.
This week I made up for the additional hours I worked on in the previous weeks. I removed the $dbi global variable from several classes, in addition to helping the GSoC students.
This week I fixed some bugs, reviewed pull requests, replaced some deprecated jQuery functions and added type declarations to multiple classes, in addition to helping the GSoC students.
This week the phpMyAdmin began to require PHP 7.1 in the master branch. So I updated the dependencies and removed some PHP 5 code. I also refactored some classes by replacing the static methods with instance methods.
Completed 3 weeks of Google Summer of Codes with phpMyAdmin. Major task for the week was to revamp the ajax handler so that it will be compatible with the new webpack generated bundle and there should not be any need of appending the files in the head of the document as it is there in the project right now. Webpack will take care of it.
Here is the major change in the AJAX add script function. There are some more changes by I am showing only this major change.
The new function introduced import()is a function which returns a promise resolution of which contains all the exported modules.
This function will take care of the appending of script in the head tag by generating chunks for modules needed by the dynamically imported module.
This function needs some edits to make it workable for all the files rather than the two files in the array.
The snapshots of the generated webpack profile with two different configurations are as below. Both the configuration have same output size both in development and production mode.
1). When vendor files like jQuery, Codemirror are not build in a separate chunk. The size of various chunks are also shown in the next snapshot
Webpack generated output
2). Second configuration when vendor files are placed in a separate bundle and included in the Header class for loading it each time with index_new.js
Major task for this week would be to work on optimising the webpack bundle and working on ajax handler to revamp it further and try to create multiple entry points for separate files and the compare the output with single entry point.
It’s been three weeks since the beginning of my project. It’s been a real challenge.
2nd week
During my second week I removed all of the php functions Twig extensions. Some of this extensions required a lot of effort because they were used on a template deep in the includes tree.
3rd week
Last week I started to deal with the templates. After defining the directory structure of the templates, I began with the directories that are already in this structure, database, server and table. I finished refactoring the db_central_columns.php file, by melding all getHtml function calls into a new function called getHtmlForMain, and all of its templates, which reduced the number of templates from 5 to 2 templates files, reducing a lot the calls to Template::get() at CentralColumns.php.
This week I’ll continue to refactor the templates on database dir.
It’s my third week of GSoC and I’ve been working on automatically creating CSS files for automated theme generator. While creating different background colours some text colours were more visible than others. After some search I came to know it’s being caused by contrast ratio .
The following image has a contrast ratio of 1.07 so it’s hard to read.
Greater ratio means greater visibility a minimum ratio of 4.5:1 is required because it compensates for the loss in contrast sensitivity usually experienced by users with vision loss and ratios greater than 7:1 is great for users with colour blindness or low visibility. So as I am coming to an end for creating Automated colour backgrounds, I’ll focus on keeping texts with high contrast ratio and also work on creating test cases.
Several code cleanups that lead to moved and renamed modules.
New addon for automatic component discovery.
The import_project management command has now slightly different parameters.
Added basic support for Windows RC files.
New addon to store contributor names in PO file headers.
The per component hook scripts are removed, use addons instead.
Add support for collecting contributor agreements.
Access control changes are now tracked in history.
New addon to ensure all components in a project have same translations.
Support for more variables in commit message templates.
Add support for providing additional textual context.
If you are upgrading from older version, please follow our upgrading instructions, the upgrade is more complex this time.
You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Turris, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
Completed 2 weeks of Google Summer of Codes with phpMyAdmin. My main task for the first two weeks was to implement webpack and babel configuration and converting some functions which are globally available into modules which can be imported at times of need. I have changed some of the files with modular structure, now I need to work on making this new structure compatible with existing code.
Major task for this week is to convert the AJAX global object into a module with a global scope in the application so that its instance can be used in different modules and files and making some part of new structure compatible.
Apart from that raised solved one issue regarding Edit Variable in Variables page in this pr.
The Docker container for Weblate got several improvements in past days and if you're using it, it might be worth reviewing your setup.
It has been upgraded to Python 3 and Django 2. This should cause no problems as Weblate itself supports both for quite some time, but if you were extending Weblate somehow, you might have to update these extensions to make them compatible.
The default cache backend is now redis. It will be required in future for some features, so you will have to switch at some point anyway. The memcached support is still there in case you want to stick with current setup.
Cron jobs have been integrated into the main container. So you no longer need to trigger them externally. This save quite some pain with offloaded indexing and another features which rely on regular execution.
Another important change is in logging - all logs are now go to the standard output, so you will get them by docker-compose logs and other Docker management commands. This will make debugging easier.
Hosted Weblate provides also free hosting for free software projects. The hosting requests queue has grown too long and waited for more than month, so it's time to process it and include new projects. I hope that gives you have good motivation to spend Christmas break by translating free software.
This time, the newly hosted projects include:
ASS Danmaku - firefox extension for downloading danmaku
Crappy Firetitle - A firefox extension allowing customisation of windows' title
Piano Booster - a MIDI file player that displays the musical notes AND teaches you how to play the piano
If you want to support this effort, please donate to Weblate, especially recurring donations are welcome to make this service alive. You can do that easily on Liberapay or Bountysource.
I’ve completed my second week of GSoC and the main task for this week was to create a form which could send palette data to the back-end to create CSS files which would be used in t he new theme. The main problem was that palette data was in HTML and was being generated dynamically by using javascript.
So I solved this problem by adding hidden input in the form when Submit button is pressed and send that using AJAX. Now my main focus is to assign different colours of colour palette to various elements.
Sorry for posting the blog this much late. Actually I got stuck in some major problems (errors to be more precise due to some changes) in the code-base so didn’t get enough time to make a blog post.
My major goal for the first two weeks was to transform some of the code-base in the ES6 format but as soon as I started to write the code in ES6 I realised that it is necessary to make some configuration files for webpack and babel so that the trans compiled code can be tested for functionality.
So in the first week I just implemented the basic configuration files for babel and webpack and try to find out what can be the possible new directory structure for js files so that the development and compiled production build files can be placed separately and some find out some basic syntax and standards of ES6 that can be implemented in the revamped code.
Apart from that I was working on this issue in changing the theme raised by me only.
Plans for 2nd week: Understanding the flow of adding js files using php code (existing one) and what changes has to be made for new code and transforming some of the files in ES6.
I’m posting this a little bit late, because I’m not used to report my work this way, hopefully I’ll get used to it fast.
This week my main goal was to remove Twig extensions that were extending php functions, there were 10 extensions, and by now I was able to remove 6 of them. I’m doing this to prevent that it’s used on future contributions that port the front-end to Twig templates.
During this work, I found some TypeErrors due to the automatic casting removal, and fixed them.
When a table is imported from a CSV file, the default table name is Table ## and default names for the columns are COL ##. Default table and column names
Enhancement-
Set the imported table name to the name of the imported file and column names to the titles of each column in the csv file OR ask the user to enter table and column names.
I was planning to add the feature of setting column names of the table imported from a csv file from the title of all the different columns, but this feature is already present.
Now, I’ll be working on some other feature(currently discussing with mentor).
I’m also working on some issues in the issue tracker.
I’ve submitted a PR for the second feature -
Following new features have been added to the csv import plugin-
For a new import, user can now directly enter the table or database name at the time of import.
Partial import. User can enter how many rows they want to import.
Show table structure edit form when the import is successful(undecided).
I’m also working on some issues in the issue tracker.
(Issue in Changing theme)[https://github.com/phpmyadmin/phpmyadmin/issues/14295]
(preg_match error when clicking Insert or Search tabs)[https://github.com/phpmyadmin/phpmyadmin/issues/14315]
Plans for next weak.
As stated in my proposal, my end sems have started and I won’t be able to work for the next 10 days.
From 1st. I’ll be working on the 3rd enhancement.
(Increase input field width for varchar(255))[https://github.com/phpmyadmin/phpmyadmin/issues/13627]
Enhancement-
In the insert row page, the dimensions of varchar textareas are small, which could be increased. As suggested in a comment, the user appreciated presence of this feature in the earlier version and thus can be re-considered in the current version for a better user-experience.
Since my end sems are approaching fast and I’ve been really busy with college projects, It has been really difficult to give 6-7 hours everyday for GSoC.
I’ve implemented the login modal and submitted a PR for review.
Although, I’ve added comments at appropriate places to make the review and understanding easier. I’ll be explaining the code in detail.
I’m also working on some issues in the issue tracker.
It’s been a week since I’ve been working on my Google Summer of Code project with phpMyAdmin and my work for this week was to create a separate page for the tool and add/remove functions in a preexisting colour picker tool. The existing tool was creating some palettes but they were not using colour theory to create palettes usable that could be used directly on websites. I have been focusing on four types four types of colour palettes, Monochromatic, Complementary, Analogous and Triadic.
The most difficulties were faced in Monochromatic and Analogous, in the monochromatic theme the main thing was how the palette should be managed if the hue value remains same and saturation and brightness changes of the base colour. I solved it by taking a range of saturation and brightness keeping the average of them equal to that of base colour. Also the values of saturation and brightness were in opposite orders for further contrast. In Analogous theme the problem was how further should the hue difference be set from base colour for optimal colours , I was quite satisfied with 45 degrees in the end. So in the end of this week I have completed all the colour palettes, the next step would be to start integrating the colour picker tool with back end.
The project involves introducing package manager for managing modules so that the modules can be updated easily, introducing ES6 into the code base, babel for compiling ES6 to ES5 which the browsers support, webpack for creating minified files which can be served in production mode and eslint for code linting to find out problematic patterns or code that doesn’t adhere to certain style guidelines.
phpMyAdmin’s javascript code is written very well in terms of logic and best practices and very well documented but there are some problems with the current code, many of the variables are globally exposed and the external libraries like jquery are used as a downloaded library. So every time a new release is there, these files need to be replaced with the new files manually.
The global variables can be reduced by using some modern javascript ES6 features like module import and export, block scoped variables and using classes and closures for interdependent files which is not there right now.
The problem of manually updating files can be removed by using a package manager like npm or yarn, which have commands like “npm update” to update the existing modules.
As the javascript code base of phpMyAdmin is very large, it might not be possible to revamp the whole code base in three months, so my major focus will be on bringing the new code with new features in such state that the existing code and the new code can me compiled together and can be used in production.
By the end of GSoC program, I expect to implement the aforementioned tools and features without breaking the build status and consistency of the code base and convert as much of ES5 code to ES6, as possible.
For future(not part of the program): There can be some other features which can be implemented like unit testing of the functions and type check of various variables which will help in reducing and easily identifying errors related to type check.
I’m very happy to announce that I was one of the selected to work with phpMyAdmin during Google Summer of Code this year, which will happen, this winter (here at Brazil), from April 23th to August 6th.
I will be working with the Twig templates currently in use at the project, which can be found here. The idea of using a template engine is to maintain code organization and consistency, by separating your logic code from your markup, or front-end.
phpMyAdmin’s front-end is not fully implemented using Twig, there’s plenty of work to be done here, my work on this project is to Refactor this templates, using more of Twig’s features to enhance code organization. The first thing that will be done is to analyse if all Twig extensions currently in use are really necessary or if it can be replaced by a Twig feature, if changes are made in this part, it will be necessary to change the code in every part that this changes affects, what can be done while refactoring each template.
After the extensions are all good, the next thing to do is to go through the code on functions that return html and apply Twig features on this functions and templates that are used. For example, here, a possible thing to do is to use ‘Blocks’ or ‘Extends’ feature to simplify all of these front-end calls into one.
By the end of the GSoC program I expect to have contributed to a project that seizes the most of Twig’s benefits. And I hope that I’ll be able to expand my open source contributions.
I am very happy to announce that I’ll be working with phpMyAdmin this summer on the project ‘Automated Theme Generator Tool’. Currently there are pre-generated themes that can be manually installed and used. The idea is to create a tool that automates and makes easier the task of creating themes. Themes created from the Theme Generator tool would be less prone to bugs in the long run and could cater to each individuals needs. For the automated themes to look good to the eye, I’ll be using the concepts of Colour Theory.
The major goal of this project is to create a tool, that would create themes giving the users adequate freedom for changes and at the same time, automates the other parameters of the themes itself so that theme looks good i.e. by using colour combinations that are appealing to the eye. Designers use a variety of techniques to create themes and colour combinations that would be good looking. One of the main tools that would be used is a designer’s colour wheel.
Though RGB and Hexadecimal values are important for creating a webpage, they are of little use while studying Colour Theory. The HSB (hue, saturation, and brightness) are more important in working with colors. HSB values can be easily converted from hexadecimal and RGB values.
Munsell Colour System
Primarily we would focus on four types of colour schemes:
Monochromatic Colour Schemes
Monochromatic schemes use different tones from the same angle on the colour wheel. All colours are derived from the base colour and the hue value is not changed.
Analogous Colour Schemes
Analogous colour schemes are created by using colours that are next to each other on the colour wheel.
Complementary Colour Schemes
Complementary schemes are created by combining colours from opposite sides of the colour wheel.
Triadic Colour Schemes
Triadic schemes are made up of hues equally spaced around colour wheel.
All the colours generated by the colour scheme using the formulas of colour theory, would be displayed on a colour palette so that the user can further tune each colour according to his choice if they want to. The main elements to keep in mind while assigning colours are:
Headers
Footers
Background
Tables
Groups
Notices
Results
Buttons
Apart from styling the webpage as a whole, the users can use the same color picker tool to customise the font color and a drop down menu to change text font from a set of predefined fonts supported by the browser.
There are many different types of text that would require different colors to distinguish each other. The most important being the following:
Headings — These would generally match with the base color of the theme.
Links and Links (on hover) — The two text should be distinguished from each other apart from being different from the normal text.
Other text — This text would cover up most of the text present on a page.
One thing to keep in mind is that for the maximum visibility of text, the text color should be contrasting to that of the background color, by default. One option is to set complementary colors to that of the colors selected in the theme.
A minor tweak that can be allowed are a set of predefined icons and if time permits, we could start working on adding gradient to the themes. The last thing required would be to save the theme settings so that the same theme opens the every time phpMyAdmin is reopened.
The final tool would look somewhat like this:
Mockup
Mockup
The four color wheels indicate the different scheme types to choose from, currently the monochromatic color scheme is shown to be selected. A color picker tool is shown which could easily convert HSB, RGB and hexadecimal values into each other. The Elements and Text palette shows the colors that would be used for them respectively. On hovering on a particular color, a popup would show for what elements the particular color would be used (Example: The cursor is on the blue color, and a pop-up displays that it would be used for hyperlinks). The Theme name asks for an input to save the theme with a particular name. The Font Style option shows a drop-down menu to select a font style. A Preview and Go button are at the bottom of the page which displays a preview and saves the theme respectively. At the right side the Sample Preview shows various sample previews of four main components(Main Window, Query and Table List, Navigation Panel, Table Data). These preview panels can be hard coded on this page rather than linking it with the original pages, this would save time and make things easier. At the end of the project we could expect the theme generator tool to be completed and ready to be pushed to master branch, and later to STABLE branch after adequate testing. A summarised list of expected deliverables are:
A customised color picker tool.
Different color scheme modes.
Custom text color and fonts.
Theme preview mode.
Save the themes settings and creating the necessary files.
Choice of predefined icons. (Optional — as advised by the mentor)
Color gradient on different elements. (If time permits)
There was a bug in the edit view feature, where the form submission button was missing. It was a small task to add the button. Currently, I am working on removing two buttons in create view form as discussed in the issue page.
There is a bug in the recent tables list on the navigation panel which doesn’t show the recently visited tables. I’ve submitted a PR which solves this issue.
Started working on the first enhancement
As I’ve stated in my proposal that I won’t be able to give 5-6 hours from 28th May to 8th June. I’ve already started working on the first enhancement.
The aim is to append a modal on the page which would ask for login, instead of rendering the whole login page, which would preserve the information which user entered in the previous session.
Progress
I’ve made the modal which is correctly appended on the page when session times out and logs in the user.
Implementation in detail-
There is a function UpdateIdleTime() in functions.js which sends post request just a second before the session runs out. When it finds that the session has expired(according to server response, more on this below), it reloads the page.
I’ve changed it so that instead of reloadin the page, it appends the modal returned(more on this below).
When updateIdleTime() sends a request to the server and it detects session timeout, it sends with a success false response and updateIdleTime() reloads the page.
Instead of returning a false response, I’ve changed the file “libraries/classes/Auth/AuthenticationCookie.php” to return a modal.
When the user logs in again, a new session is started issuing a new session token, all the hidden form elements with the old session token are replaced with the new token.
If a new user logs in, it reloads the page.
Security Concerns
I’m currenty testing for security vulnerabilities and implementing security features to prevent unauthorized access.
Page is automatically reloaded if the modal is deleted explicilty.
All the page functionalities are disabled while the modal appears.
Next release on Weblate roadmap is called 3.0 and will bring some important changes. Some of these are already present in the Git repository and deployed on Hosted Weblate, but more of that will follow.
Component discovery
Component discovery is useful feature if you have several translation components in one repository. Previously import_project management command was the only way to help you, however it had to be executed manually on any change. Now you can use Component discovery addon which does quite similar thing, however is triggered on VCS update, so it can be used to follow structure of your project without any manual interaction. This feature is already available in Git and on Hosted Weblate, though you have to ask for initial setup there.
Code cleanups
Over the years (first Weblate release was more than six years ago) the code structure is far from optimal. There are several code cleanups scheduled and some of them are already present in Git repository. This will make Weblate easier to maintain and extend (eg. with third party file format drivers).
User management
Since the beginning Weblate has relied on user management and permissions as provided by Django. This is really not a good fit for language / project matrix permissions which most people need so we've come with Group ACL to extend this. This worked quite well for some use cases, but it turned out to be problematic for others. It is also quite hard to setup properly. For Weblate 3.0 this will be dropped and replaced by access control which fits more use cases. This is still being finalized in our issue tracker, so if you have any comments to this, please share them.
Migration path
Due to above mentioned massive changes, migrations across 3.0 will not be supported. You will always have to upgrade to 3.0 first and then upgrade to further versions. The code cleanups will also lead to some changes in the configuration, so take care when upgrading and follow upgrading instructions.
I started backend development about a year ago and I’ve been using phpmyadmin ever since. I can’t remember a time in my learning when I didn’t use phpmyadmin to manage my databases. Using phpmyadmin makes the development process so easy and fast because I don’t have to write SQL queries again and again, and can focus on writing code for my app.
I was determined to participate in GSoC this year and wanted to work in php to apply what I had learned and to take my development skills to a higher level. When I saw phpmyadmin as one of the organisations in GSoC, I had instantly decided that I’ll be applying in this org.
Early participation and contributions
I started contributing to phpmyadmin in January this year and I was fascinated to see the well-maintained multi-platform (Web, Desktop, Mobile) support and codebase.
Through my contributions in phpmyadmin I have learnt a lot about open source development and more importantly about good software development techniques. Following are the links to my contributions to the repository.
I am excited about contributing to phpmyadmin and hope to meet the expected standards.
Project Abstract
The aim of the project is to implement some of the enhancements suggested in the issue tracker to improve user experience(adding new useful features and making the app easier to use), security and performance.
I have still to figure out how often would I post on this blog. I am planning something of a weekly update posts but that’d depend on how the work progresses.
I’ll stay in contact with my mentor, reporting the progress, getting feedback about the ideas and the code I’ll write.
The default idle session timeout is 24 minutes, after which the session is destroyed and
the user has to login again to use the app. The problem is that the login page is
rendered over the current page leading to loss of all the information user was entering.
Login page overwrites the current page
Enhancement -
Append a modal on the page which would ask for login, instead of rendering the
whole login page, which would preserve information.
2. Importing table from a CSV file
When a table is imported from a CSV file, the default table name is Table ## and default
names for the columns are COL ##.
Default table and column names
Enhancement-
Set the imported table name to the name of the imported file and column names
to the titles of each column in the csv file OR ask the user to enter table and column
names.
In the insert row page, the dimensions of varchar textareas are small, which
could be increased. As suggested in a comment, the user appreciated presence of this
feature in the earlier version and thus can be re-considered in the current version for a
better user-experience.
Making an existing int column ‘auto_increment’ shows the error message “#1075 -
Incorrect table definition; there can be only one auto column and it must be defined as a
key”.
Error message when trying to add auto increment on existing column
In the error popup, it is difficult to read the query when it overflows and it’s not possible
to copy the query as the popup closes when clicked.
Error popup
Enhancement-
Disable onclick close by default and add a close button at the top right corner.
Wrap the query if it overflows for better readability.
All user configuration is stored in the user preferences. When the phpMyAdmin storage
configuration is not configured, these do not persist over session.
Enhancement-
Use browser local storage for storing user configuration.
MariaDB (MySQL-compatible) added support for CHECK constraints to version 10.2.
(stable=10.2.8). It would be very useful if PHPMyAdmin had a UI for adding and
managing these in tbl_create.php and tbl_structure.php.
Enhancement-
Implement a UI for adding and managing CHECK constraints in tbl_create.php
and tbl_structure.php.