Writing Installation Script for Github Projects

I would like to discuss how to write a bash script to setup any github project and in particular PHP and mysql project. I would like take the example of engelsystem for this post. First, we need to make a list of all environments and dependencies for our github project. For PHP and mysql project we need to install LAMP server. The script to install all the dependencies for engelsystem are echo "Update your package manager" apt-get update echo "Installing LAMP" echo "Install Apache" apt-get install apache2 echo "Install MySQL" apt-get install mysql-server php5-mysql echo "Install PHP" apt-get install php5 libapache2-mod-php5 php5-mcrypt echo "Install php cgi" apt-cache search php5-cgi We can even add echo statements with instructions. Once we have installed LAMP. We need to clone the project from github. We need to install git and clone the repository. Script for installing git and cloning github repository are echo "Install git" apt-get install git cd /var/www/html echo "Cloning the github repository" git clone --recursive https://github.com/fossasia/engelsystem.git cd engelsystem Now we are in the project directory. Now we need to set up the database and migrate the tables. We are creating a database engelsystem and migrating the tables in install.sql and update.sql. echo "enter mysql root password" # creating new database engelsystem echo "create database engelsystem" | mysql -u root -p echo "migrate the table to engelsystem database" mysql -u root -p engelsystem < db/install.sql mysql -u root -p engelsystem < db/update.sql Once we are done with it. We need to copy config-sample.default.php to config.php and add the database and password for mysql. echo "enter the database name username and password" cp config/config-sample.default.php config/config.php Now edit the config.php file. Once we have done this we need to restart apache then we can view the login page at localhost/engelsystem/public echo "Restarting Apache" service apache2 restart echo "Engelsystem is successfully installed and can be viewed on local server localhost/engelsystem/public" We need to add all these instructions in install.sh file. Now steps to execute a bash file. Change the permissions of install.sh file $ chmod +x install.sh Now run the file from your terminal by executing the following command $ ./install.sh Developers who are interested in contributing can work with us. Development: https://github.com/fossasia/engelsystem Issues/Bugs:https://github.com/fossasia/engelsystem/issues

Continue ReadingWriting Installation Script for Github Projects

Implementing MVC on Engelsystem

Engelsystem is an MVC based PHP application, but there was a 4th ties, Pages, introduced with the traditional MVC pattern. It seems to have everything an event manager could want. The Model-View-Control (MVC) pattern, originally formulated in the late 1970s, is a software architecture pattern built on the basis of keeping the presentation of data separate from the methods that interact with the data. In theory, a well-developed MVC system should allow a front-end developer and a back-end developer to work on the same system without interfering, sharing, or editing files either party is working on. Like everything else in software engineering, it seems, the concept of Model-View-Controller was originally invented bySmalltalk programmers. More specifically, it was invented by one Smalltalk programmer, Trygve Reenskaug. Trygve maintains a page that explains the history of MVC in his own words.   The components of an MVC pattern are explained as follows: MODEL: The Model is the name given to the permanent storage of the data used in the overall design. Models represent knowledge. A model could be a single object (rather uninteresting), or it could be some structure of objects. VIEW: The View is where data, requested from the Model, is viewed and its final output is determined. A view is a (visual) representation of its model. It would ordinarily highlight certain attributes of the model and suppress others. It is thus acting as a presentation filter. Traditionally in web apps built using MVC, the View is the part of the system where the HTML is generated and displayed. The View also ignites reactions from the user, who then goes on to interact with the Controller. CONTROLLER: The final component of the triad is the Controller.A controller is the link between a user and the system. It provides the user with input by arranging for relevant views to present themselves in appropriate places on the screen. Its job is to handle data that the user inputs or submits, and update the Model accordingly. The Controller’s life blood is the user; without user interactions, the Controller has no purpose.   Even though MVC was originally designed for personal computing, it has been adapted and is widely being used by web developers due to its emphasis on separation of concerns, and thus indirectly, reusable code. The pattern encourages the development of modular systems, allowing developers to quickly update, add, or even remove functionality.   Initially, in Engelsystem there were files distributed in 4 tiers, Model, View, Controller, Pages, which are mentioned as follows: Pages: admin_active.php admin_arrive.php admin_export.php admin_free.php admin_groups.php admin_import.php admin_log.php admin_news.php admin_questions.php admin_rooms.php admin_settings.php admin_shifts.php admin_user.php guest_credits.php guest_login.php guest_start.php guest_stats.php user_atom.php user_ical.php user_messages.php user_myshifts.php user_news.php user_questions.php user_settings.php user_shifts.php Model: AngelType_model.php LogEntries_model.php Message_model.php NeededAngelTypes_model.php Room_model.php Settings_model.php ShiftEntry_model.php ShiftTypes_model.php Shifts_model.php UserAngelTypes_model.php UserDriverLicenses.model.php User_model.php Controller angeltype_controller.php rooms_controller.php shifts_controller.php shifttypes_controller.php user_angeltypes_controller.php user_driver_licenses_controller.php user_controller.php View AngelTypes_view.php Questions_view.php Rooms_view.php ShiftEntry_view.php ShiftTypes_view.php Shifts_view.php UserAngelTypes_view.php UserDriverLicenses_view.php User_view.php   There were 26 Pages files, in which there were both sql queries along with the controller code. All these files were refactured into Controller and Model(which contains sql queries)…

Continue ReadingImplementing MVC on Engelsystem

Read and Understand Codacy Reports

To begin understanding reports, let's start with what Codacy is. So. What is Codacy? Codacy is an automated code review tool that helps developers to save time in code reviews and to tackle technical debt. It centralises customizable code patterns and enforces them within engineering teams. Codacy tracks new issues by severity level for every commit and pull request. It can be integrated with the GitHub repository to review every commit and pull request in terms of quality and errors. It checks code style, security, duplication, complexity and coverage on every change while tracking code quality throughout your sprints. You can integrate Codacy in your private/public repository by going here. Sign up with your Github account and follow the steps mentioned. More information regarding GitHub integration can be found here. Features of Codacy: SAVE TIME IN CODE REVIEWS INTEGRATED IN YOUR WORKFLOW TRACK YOUR PROJECT QUALITY EVOLUTION Now we get to understanding Codacy reports. Below shows and image of how a Codacy dashboard looks like, to evaluate a project. To evaluate a project we should know what are the "Software Metrics". A software metric is a standard of measure of a degree to which a software system or process possesses some property. Even if a metric is not a measurement (metrics are functions, while measurements are the numbers obtained by the application of metrics), often the two terms are used as synonymous. Since quantitative measurements are essential in all sciences, there is a continuous effort by computer science practitioners and theoreticians to bring similar approaches to software development. The goal is obtaining objective, reproducible and quantifiable measurements, which may have numerous valuable applications in the schedule and budget planning, cost estimation, quality assurance testing, software debugging, software performance optimization, and optimal personnel task assignments. You can learn about software metrics by visiting here. A Codacy Dashboard provides answer to the following 3 main things: What is the state of your projects code quality? How is it evolving throughout time? What are the hotspots in your code? Component of the Dashboard: Introduction: The Dashboard is the central screen of any project on Codacy. Project Certification: After running a complete on the project or the GitHub repository, Codacy provides an overall grade to the project from A-F. The grade depends on the following parameters. Error Prone Code Complexity Code Style Unused Code Security Compatibility Documentation Performance Issues Breakdown: Issues breakdown represents the different issues from different areas in a pictorial representation. It provides a quick overview of the total number of issues in the repository and the breakdown per category. Users can click on the specific category for more details. Code Coverage: If you setup the code coverage on your repository, you will be able to see the overall covered percentage on the dashboard. It will also show the files with the worst code coverage allowing you to directly jump to the file to see the details. Goals: Users can define individual goals to remove errors and get better grades for their projects. Historic data: Codacy dashboard also provides an analysis of the Historic data,…

Continue ReadingRead and Understand Codacy Reports

Continuous Integration and Automated Testing for Engelsystem

Every software development group tests its products, yet delivered software always has defects. Test engineers strive to catch them before the product is released but they always creep in and they often reappear, even with the best manual testing processes. Using automated testing is the best way to increase the effectiveness, efficiency and coverage of your software testing. Manual software testing is performed by a human sitting in front of a computer carefully going through application screens, trying various usage and input combinations, comparing the results to the expected behavior and recording their observations. Manual tests are repeated often during development cycles for source code changes and other situations like multiple operating environments and hardware configurations. Continuous integration (CI) has emerged as one of the most efficient ways to develop code. But testing has not always been a major part of the CI conversation. In some respects, that’s not surprising. Traditionally, CI has been all about speeding up the coding, building, and release process. Instead of having each programmer write code separately, integrate it manually, and then wait until the next daily or weekly build to see if the changes broke anything, CI lets developers code and compile on a virtually continuous basis. It also means developers and admins can work together seamlessly since the programming and build processes are always in sync. Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. By integrating regularly, you can detect errors quickly, and locate them more easily. Solve problems quickly Because you’re integrating so frequently, there is significantly less back-tracking to discover where things went wrong, so you can spend more time building features. Continuous Integration is cheap. Not continuously integrating is costly. If you don’t follow a continuous approach, you’ll have longer periods between integrations. This makes it exponentially more difficult to find and fix problems. Such integration problems can easily knock a project off-schedule, or cause it to fail altogether. Continuous Integration brings multiple benefits to your organization: Say goodbye to long and tense integrations Increase visibility which enables greater communication Catch issues fast and nip them in the bud Spend less time debugging and more time adding features Proceed with the confidence you’re building on a solid foundation Stop waiting to find out if your code’s going to work Reduce integration problems allowing you to deliver software more rapidly “Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.” - Martin Fowler, Chief Scientist, ThoughtWorks Continuous Integration is backed by several important principles and practices. Practices in Continuous Integration: Maintain a single source repository Automate the build Make your build self-testing Every commit should build on an integration machine Keep the build fast Test in a clone of the production environment Make it easy for anyone to get the latest executable Everyone can see what’s…

Continue ReadingContinuous Integration and Automated Testing for Engelsystem

Deploying PHP and Mysql Apps on Heroku

This tutorial will help you deploying a PHP and Mysql app. Prerequisites a free Heroku account. PHP installed locally. Composer installed locally. Set up In this step you will install the Heroku Toolbelt. This provides you access to the Heroku Command Line Interface (CLI), which can be used for managing and scaling your applications and add-ons. To install the Toolbelt for ubuntu/Debian wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh After installing Toolbelt you can use the heroku command from your command shell. $ heroku login Enter your Heroku credentials. Email: dz@example.com Password: ... Authenticating is required to allow both the heroku and git commands to operate. Prepare the app In this step, you will prepare a fossasia/engelsystem application that can be deployed. To clone the sample application so that you have a local version of the code that you can then deploy to Heroku, execute the following commands in your local command shell or terminal: $ git clone --recursive https://github.com/fossasia/engelsystem.git $ cd engelsystem/ If it is not a git repository you follow these steps $ cd engelsystem/ $ git init You now have a functioning git repository that contains a simple application now we need to add a composer.json file. Make sure you’ve installed Composer. The Heroku PHP Support will be applied to applications only when the application has a file named composer.json in the root directory. Even if an application has no Composer dependencies, it must include at least an empty ({}) composer.json in order to be recognized as a PHP application. When Heroku recognizes a PHP application, it will respond accordingly during a push: $ git push heroku master -----> PHP app detected … Define a Procfile A Procfile is a text file in the root directory of your application that defines process types and explicitly declares what command should be executed to start your app. Your Procfile will look something like this for engelsystem: web: vendor/bin/heroku-php-apache2 public/ Since our folder named public that contains your JavaScript, CSS, images and index.php file, your Procfile would define the Apache web server with that directory used as document root. Create the app In this step you will create the app to Heroku. Create an app on Heroku, which prepares Heroku to receive your source code: $ heroku create Creating sharp-rain-871... done, stack is cedar-14 http://sharp-rain-871.herokuapp.com/ | https://git.heroku.com/sharp-rain-871.git Git remote heroku added When you create an app, a git remote (called heroku) is also created and associated with your local git repository. Heroku generates a random name (in this case sharp-rain-871) for your app, or you can pass a parameter to specify your own app name. But Once you open http://sharp-rain-871.herokuapp.com/ we will not be able to view the site if there are database connections. We need to migrate the database using Cleardb ClearDB MySQL Migrating database Creating your ClearDB database To create your ClearDB database, simply type the following Heroku command: $ heroku addons:create cleardb:ignite -----> Adding cleardb to sharp-mountain-4005... done, v18 (free) This will automatically provision your new ClearDB database for…

Continue ReadingDeploying PHP and Mysql Apps on Heroku

Implementing Captcha for Engelsystem

Knock, knock. Who’s there? A spam bot. If you’re a web administrator or website owner, then you are bound to know the ugly truth that is the Spam Bot. Someone, somewhere in the world must have made a deal with the Devil in hopes of a larger payout that didn’t exactly pan out the way they. The goal of the volunteer system (Engelsystem) is to facilitate the work of event organizers and event volunteers. It would be creating problems if bots signup for shifts and fill all the vacancies. Thanks to the mastermind behind them, those pesky little underlings crawl the web ready to cause mischief at every turn. This means more work and more time eaten up for the honest web admin/event organizer who is left to clean up the mess left in their wake. What Is CAPTCHA? CAPTCHAs are nothing new to the experienced web surfer. Sites/web apps, both large and small, use the system for one reason or another. But, ever wonder where in the world the people who coined the phrase, CAPTCHA, came up with that nonsensical name? Well, you may find it interesting to know that the strange word is actually a clever acronym meaning the following: Completely Automated Public Test to tell Computers and Humans Apart. What a mouthful! Now aren’t you happy that they shortened it? The actual meaning of the word essentially explains exactly what its purpose is: keeping pesky bots out and letting in well-meaning humans (or at least that is the hope). We worked on implementing Google reCaptcha to the registration form and to the shifts signup page. On websites using this new API, a significant number of users will be able to securely and easily verify they’re human without actually having to solve a CAPTCHA. Instead, with just a single click, they’ll confirm they are not a robot. Client-side integration: if (isset($_REQUEST['g-recaptcha-response']) && !empty($_REQUEST['g-recaptcha-response'])) { $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'hppts://www.google.com/recaptcha/api/siteverify', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => [ 'secret' => '', // Enter your private key here. 'response' => $_REQUEST['g-recaptcha-response'], ] ]); $response = json_decode(curl_exec($curl)); $msg .= error(sprintf(_(print_r($response)), $nick), true); } else { $ok = false; $msg .= error(_("You are a Robot."), true); } } If the System is hosted on an online server, the user needs to register and get the API keys for implementing Google reCaptcha here. Final Thoughts Spam is a big issue for all websites, including sites ran on WordPress. Although CAPTCHA forms don’t completely eliminate spam mongers, when you use it with other popular spam blocking plugins like Akismet, you really do have the advantage on the spam bot battlefield. Development: https://github.com/fossasia/engelsystem                                           Issues/Bugs:https://github.com/fossasia/engelsystem/issues

Continue ReadingImplementing Captcha for Engelsystem

Engelsytem – Sending messages to users or groups with PHP

In this post I will be discussing on how to send messages to other users and members of groups in PHP. Implementation We need to create a table for Message where we can store sender’s id and receiver id, text which are required while sending and receiving messages. MYSQL Syntax of Messages Table DROP TABLE IF EXISTS `Messages`; CREATE TABLE IF NOT EXISTS `Messages` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `Datum` int(11) NOT NULL,   `SUID` int(11) NOT NULL DEFAULT '0',   `RUID` int(11) NOT NULL DEFAULT '0',   `isRead` char(1) NOT NULL DEFAULT 'N',   `Text` text NOT NULL,   PRIMARY KEY (`id`),   KEY `Datum` (`Datum`),   KEY `SUID` (`SUID`),   KEY `RUID` (`RUID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Fuers interen Communikationssystem' AUTO_INCREMENT=1 ; After initializing the table. we need to create a Page for sending and receiving messages which looks like this       $messages_table_entry = array(       'new' => $message['isRead'] == 'N' ? '<span class="glyphicon glyphicon-envelope"></span>' : '',           'timestamp' => date("Y-m-d H:i", $message['Datum']),           'from' => User_Nick_render($sender_user_source),           'to' => User_Nick_render($receiver_user_source),           'text' => str_replace("\n", '<br />', $message['Text'])       ); The message table looks something like this. we need to store the sender and receiver id and update the message table .The function for sending messages looks something like this. function Message_send($id, $text) {   global $user;   $text = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', strip_tags($text));   $to = preg_replace("/([^0-9]{1,})/ui", '', strip_tags($id));   if (($text != "" && is_numeric($to)) && (sql_num_query("SELECT * FROM `User` WHERE `UID`='" . sql_escape($to) . "' AND NOT `UID`='" . sql_escape($user['UID']) . "' LIMIT 1") > 0)) {     sql_query("INSERT INTO `Messages` SET `Datum`='" . sql_escape(time()) . "', `SUID`='" . sql_escape($user['UID']) . "', `RUID`='" . sql_escape($to) . "', `Text`='" . sql_escape($text) . "'");     return true;   } else {     return false;   } } this function is to send message $id is the id of receiver and $text is the text message. To delete messages          $message = sql_select("SELECT * FROM `Messages` WHERE `id`='" . sql_escape($id) . "' LIMIT 1");  if (count($message) > 0 && $message[0]['SUID'] == $user['UID']) {           sql_query("DELETE FROM `Messages` WHERE `id`='" . sql_escape($id) . "' LIMIT 1");           redirect(page_link_to("user_messages"));         } else           return error(_("No Message found."), true); Development: https://github.com/fossasia/engelsystem Issues/Bugs:Issues

Continue ReadingEngelsytem – Sending messages to users or groups with PHP

Adding Notifications, Volunteer Shifts and DB Export in Engelsystem

Admin can change the display message in registration form The present system doesn't allow to change the display message in register form. When the system is used for different events it would be useful if the admin is able to change the display message in registration form . I have added feature were admin can change the display message By changing the message in the message box admin can change the display message.Now the message looks like this. Implementation of changing display message. Adding display_msg field to User Table so that the display_msg can be accessed through the database any where through the code and can be changed easily ALTER TABLE `User` ADD `display_msg` varchar(255) DEFAULT "By completing this form you're registering as a Chaos-Angel. This script will create you an account in the angel task scheduler."; Next step is to update the field whenever it is changed by admin sql_query("UPDATE `User` SET `display_msg`='" . sql_escape($display_message) . "' WHERE `UID`='" . sql_escape($user['UID']) . "'"); Copy/ Duplicate function for creating new shifts from existing shifts The present system doesn't allow admin to edit an existing shift and create a new shift from the existing data of already created shifts . I have created a copy shift option where admin can edit the shift and create a new shift In this page admin can create new shift or update the existing shift . Admin can change the date , time , no of angels etc as admin used to create shifts. Implementation of copy shifts function Once the admin selects create new shifts button , we need to use the same data so we need to store the values in variables. once admin selects the option we need to do all the error handling and create new shifts . if (isset($_REQUEST['shifttype_id'])) { $shifttype = ShiftType($_REQUEST['shifttype_id']); if ($shifttype === false) engelsystem_error('Unable to load shift type.'); if ($shifttype == null) { $ok = false; error(_('Please select a shift type.')); } else $shifttype_id = $_REQUEST['shifttype_id']; } else { $ok = false; error(_('Please select a shift type.')); } $title = strip_request_item('title'); // check for errors if (isset($_REQUEST['rid']) && preg_match("/^[0-9]+$/", $_REQUEST['rid']) && isset($room_array[$_REQUEST['rid']])) $rid = $_REQUEST['rid']; else { $ok = false; $rid = $rooms[0]['RID']; error(_('Please select a location.')); } if (isset($_REQUEST['start']) && $tmp = DateTime::createFromFormat("Y-m-d", trim($_REQUEST['start']))) $start = $tmp->getTimestamp(); else { $ok = false; error(_('Please select a start date.')); } if (isset($_REQUEST['end']) && $tmp = DateTime::createFromFormat("Y-m-d", trim($_REQUEST['end']))) $end = $tmp->getTimestamp(); else { $ok = false; error(_('Please select an end date.')); } if (isset($_REQUEST['start_time']) && $tmp = DateTime::createFromFormat("H:i", trim($_REQUEST['start_time']))) $start_time = $tmp->getTimestamp(); else { $ok = false; error(_('Please select an start time.')); } if (isset($_REQUEST['end_time']) && $tmp = DateTime::createFromFormat("H:i", trim($_REQUEST['end_time']))) $end_time = $tmp->getTimestamp(); else { $ok = false; error(_('Please select an end time.')); } if (strtotime($_REQUEST['start']) > strtotime($_REQUEST['end'])) { $ok = false; error(_('The shifts end has to be after its start.')); } if (strtotime($_REQUEST['start']) == strtotime($_REQUEST['end'])) { if (strtotime($_REQUEST['start_time']) > strtotime($_REQUEST['end_time'])) { $ok = false; error(_('The shifts end time has to be after its start time.')); } }…

Continue ReadingAdding Notifications, Volunteer Shifts and DB Export in Engelsystem

Why Coding Standards Matter

Coding standards are a set of guidelines, best practices, programming styles and conventions that developers adhere to when writing source code for a project. All big software companies have them. A coding standards document tells developers how they must write their code. Instead of each developer coding in their own preferred style, they will write all code to the standards outlined in the document. This makes sure that a large project is coded in a consistent style — parts are not written differently by different programmers. Not only does this solution make the code easier to understand, it also ensures that any developer who looks at the code will know what to expect throughout the entire application. When you start sharing code or start reading code shared by others, you begin to realize that not everybody writes their code they way you do. You see that other, ugly coding style, and think “everybody needs to write in the same style so that things are easier for me to understand.” Thus, it is natural that everybody wants their own habits turned into the standard, so they don’t have to change their habits. They’re used to reading code a certain way (their own way) and get irritated when they see the code in a different format. The thing about defining a coding style standard is that there are no objective means by which to judge one style as “better” or “more-right” than another. Sure, we can talk about “readability” and “consistency” but what is readable is different for each coder (depending on what they’re used to) and consistency follows automatically because, well, why would you use another style? Other than in the broadest outlines, defining a coding standard is an exercise in arbitrariness. Who says that a 75 character line is better than 72, or 80? Who says putting braces in one place is better than putting them elsewhere? And who are they to say; by what standard do they judge? The point of a coding style standard is not to say one style is objectively better than another in the sense of the specific details (75 characters and one-true-brace convention, for example). Instead, the point is to set up known expectations on how code is going to look. For example, my project Engelsystem,it is a project written by more than one person. If you examine some Script A and see one coding style, then examine Script B and see another, the effect is very jarring; they don’t look like they belong to the same project. Similarly, when I, a Developer, (who uses one coding style) attempts to patch or add to a separate project from other Developer (who uses another coding style) the mix-and-match result in the same project (or even the same file!) is doubly jarring. Another example that I can think of: a manager who insisted on being part of every major code review. During the reviews, he would flag formatting issues, that were almost always a matter of his own…

Continue ReadingWhy Coding Standards Matter

Language Localization on Engelsystem

During the 3rd  week of my Summer of Code, I worked on implementing Localization of different languages on the system and creating a different settings page for user and admin. One of our goals is for Engelsystem to be a great experience for users worldwide. To achieve this goal we need to make some significant changes. The main reason of localization is that it can be used by different people with different native languages across the world and help them to understand the system better . First, a little background. Right now, Engelsystem has two localization systems available: Deutsch English All of the current translations will be updated. We are also expanding the list of supported languages to as many as we can. Currently, I’ve implemented: Bulgarian Chinese- simplified English UK French Hindi-IN Hungarian Irish Punjabi-IN Spanish Tamil-IN The tools used in implementing localization are poedit where we create the .po files . For installing Poedit on Linux distro’s, users can use the following command in the terminal, sudo apt-get install poedit For Windows and Mac users, they can download the executable file here. Steps to run Poedit in Linux/Windows/Mac: choose File → New Catalog.Enter the details in Translation properties like your email. Source code charset should be selected as UTF-8.Now the source path should be selected as (.) dot to tell Poedit to search for PHP files in the same folder. In the source, there are three options ‘_’ , ‘gettext’ and  ‘gettext_noop’.Make sure all necessary functions are added and press OK. Now we can see the list of strings on left and their translated strings on the right.we need to install the necessary dictionary for this. Save the file  with an extension ‘.po’ .  In Engelsystem, to implement the translated localization file we need to make the changes in the file,internationalization_helper.php $locales = array( ‘de_DE.UTF-8’ => “Deutsch”, ‘hi_IN.UTF-8’ => “Hindi”, ‘sp_EU.UTF-8’ => “Spanish”, ‘en_US.UTF-8’ => “English” ); During the week 3 of my Summer of Code I also worked on creating different settings page for user and Admin. Earlier settings page for user and admin were same, providing same privileges to both of them. Now we have separate pages for both. In the later weeks, other developers and I would be working on adding more languages to the system. Anyone who would like to work in the project are welcome. Developers can feel free to take up any issues they would like to work on just like any other open source projects. Development: https://github.com/fossasia/engelsystem                                           Issues/Bugs:https://github.com/fossasia/engelsystem/issues

Continue ReadingLanguage Localization on Engelsystem