CSC/ECE 517 Fall 2018/E1866 Expertiza Internationalization: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 69: Line 69:


* For this project, we will be adding support for one language right now, Hindi.  
* For this project, we will be adding support for one language right now, Hindi.  
* We are using Google Translate to convert the words to Hindi.
* We are using Google Translate to convert the strings to Hindi.
* We will be using the [https://guides.rubyonrails.org/i18n.html#how-i18n-in-ruby-on-rails-works Rails Internationalization (I18n) API] to help us add multi language support.
* We will be using the [https://guides.rubyonrails.org/i18n.html#how-i18n-in-ruby-on-rails-works Rails Internationalization (I18n) API] to help us add multi language support.
* There will be two <code>yaml</code> files in the <code>config/locales</code> directory representing the different languages that can be used in Expertiza.
* There will be two <code>yaml</code> files in the <code>config/locales</code> directory representing the different languages that can be used in Expertiza.
Line 76: Line 76:
*** <code>hi_IN.yml</code>
*** <code>hi_IN.yml</code>
** These <code>yaml</code> files contain the translated strings for their respective language.
** These <code>yaml</code> files contain the translated strings for their respective language.
* We will be editing the <code>routes.rb</code> file and all the view files so that it can read from the <code>yaml</code> files to show other languages.
* We will be editing the <code>routes.rb, application.rb, application_controller.rb</code> files and all the view files related to Student Assignments so that it can read from the <code>yaml</code> files to show other languages.


===Example Output===
===Example Output===

Revision as of 18:10, 3 December 2018

Introduction

Team Members

Jonathan Gill (jtgill@ncsu.edu)

Hasham Mukhtar (hmukhta@ncsu.edu)

Abhilasha Saini (asaini4@ncsu.edu)

Reddy Aravind Karnam Ganesh (rkarnam@ncsu.edu)

Mentor

Zhewei Hu (zhu6@ncsu.edu)

Relevant Files

config/locales/

  • en.yml
  • hi_IN.yml

config/

  • routes.rb
  • application.rb

app/controllers/applcation_controller.rb

Student View Files:

  • app/views/
    • shared/
      • _navigation.html.erb
    • grades/
      • view_my_scores.html.erb
      • review_team.html.erb
    • sign_up_sheet/
      • _suggested_topic.html.erb
      • _table_header.html.erb
      • list.html.erb
    • student_task/
      • list.html.erb
      • view.html.erb
    • student_teams/
      • edit.html.erb
      • view.html.erb
    • student_review/list.html.erb
    • participants/change_handle.html.erb
    • submitted_content/edit.html.erb

Project Description

Currently Expertiza only supports the English language. Many Expertiza users are from other countries. We aim to allow students to view their pages in another language. This will be done by internationalizing static strings in Expertiza for Student assignment related pages to another language (ex: Hindi or Chinese). Students will have the ability to change the language through a dropdown located in navigation bar at the top of the page. We will not be affecting any strings that are dynamically shown..

Project Design

Technical Design

Allowing Student to change language for Assignment Pages

  • We will add a dropdown in the navigation bar for a student to use
  • They will be able to choose from English or Hindi
  • When the language is clicked on it will change all the static strings in the Student Views related to assignments to the newly selected language.

Adding Multi-Language Support

  • For this project, we will be adding support for one language right now, Hindi.
  • We are using Google Translate to convert the strings to Hindi.
  • We will be using the Rails Internationalization (I18n) API to help us add multi language support.
  • There will be two yaml files in the config/locales directory representing the different languages that can be used in Expertiza.
    • One for English, which will be the default language used, and another for Hindi.
      • en.yml
      • hi_IN.yml
    • These yaml files contain the translated strings for their respective language.
  • We will be editing the routes.rb, application.rb, application_controller.rb files and all the view files related to Student Assignments so that it can read from the yaml files to show other languages.

Example Output

Original Page

Language Dropdown

Translated Page


Test Plan

Overview

  • Plan to test translated pages to see if Hindi is shown instead of English
    • Using rspec and/or capybara

Scenarios

1. Log in to Expertiza as an instructor. Go to the Edit Course Page for a course. Go to language dropdown and choose Hindi. Click update. Check to see if Edit Course Page English strings are translated to Hindi

2. While still logged in as an instructor, check if the Edit Assignment page is also translated.

3. While still logged in as an instructor, check if other pages are also translated.

Links/References

Project Links

Support Material