Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard-coded strings to i18n strings #427

Closed
wants to merge 12 commits into from
Closed

Hard-coded strings to i18n strings #427

wants to merge 12 commits into from

Conversation

Cinnamy
Copy link
Contributor

@Cinnamy Cinnamy commented Oct 18, 2015

Replaced in the main application layout, RevisionList and CourseCreator.

…tion layout, RevisionList and CourseCreator.
@ragesoss
Copy link
Member

@kenua Hi!

You've gotten started in the right direction with this, but the corresponding strings need to be added to config/locale/en.yml (and qqq.yml) for it to work as intended.

The idea here is that the I18n.t function uses the strings encoded in the locale files to insert the appropriate language string. See, for example, the use of it here: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/app/assets/javascripts/components/students/student_list.cjsx#L52

The I18n.t function takes users.name and looks up the corresponding string for a given language: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/config/locales/en.yml#L183

So here we need to take each of those English strings, and add them to the en.yml file, and then call them by their message keys instead of the literal English strings we use now.

@ragesoss
Copy link
Member

@kenua Were you able to get a development environment up and running? If so, you can try out your changes by running rake i18n:js:export on the command line. That command will regenerate the I18n javascripts from the locale .yml files, so that you can verify that the strings are showing up as expected when you're using the app.

One other little details: be sure to fetch the latest version of master and rebase your changes onto master. Let me know if I can help with that.

@Cinnamy
Copy link
Contributor Author

Cinnamy commented Oct 19, 2015

Thank so much for instruction, hope now I really understand what to do with this function. I still have a problem with installing capybara-webkit (whatever it is) and so can't run rake i18n:js:export, but I'll cope with it as soon as possible.

@Cinnamy
Copy link
Contributor Author

Cinnamy commented Oct 22, 2015

Hi! Tell, please, does an another way to verify correctness of my changes
in code exist? I've made my tasks (and even a little more) according to
your instruction long ago, but still can't deal with a development
environment. Virtual machines work too slowly on my old netbook, so I tried
to install all these things on Windows and was very close to success, but a
little bug in Qt installation embitters me for about a week. A lot of time
was spent trying to fix it, and I'm afraid I will not have sufficient time
for Dashboard tasks if keep doing. So can I do anything?

On Sun, Oct 18, 2015 at 8:52 PM, Sage Ross notifications@github.com wrote:

@kenua https://github.com/Kenua Were you able to get a development
environment up and running? If so, you can try out your changes by running rake
i18n:js:export on the command line. That command will regenerate the I18n
javascripts from the locale .yml files, so that you can verify that the
strings are showing up as expected when you're using the app.

One other little details: be sure to fetch the latest version of master
and rebase your changes onto master. Let me know if I can help with that.


Reply to this email directly or view it on GitHub
#427 (comment)
.

@ragesoss
Copy link
Member

@kenua Getting a development environment running would be essential to working on this as an Outreachy internship. Unfortunately, I don't have any experience with trying to run a Rails development environment in Windows, but from what I've read, it's not easy. Your best option might be to install Ubuntu on your netbook.

@Cinnamy
Copy link
Contributor Author

Cinnamy commented Oct 29, 2015

@ragesoss Please, tell something about the last version of RevisionList, Course Creator, and main application layout.

@ragesoss
Copy link
Member

@kenua Hi! I didn't see the new commits until your comment yesterday... sorry about that delay. I'll take a look soon... Monday, if not today.

Were you able to get a development environment up and running? If so, did you try it out and verify that the substituted strings are working as expected?

@Cinnamy
Copy link
Contributor Author

Cinnamy commented Nov 1, 2015

@ragesoss Yes, I can't believe, but I've installed all these programs, rechecked the written and debugged it. Now it must work.

And one question: should I commit .js-files?

@ragesoss
Copy link
Member

ragesoss commented Nov 3, 2015

Merged as #449.

@kenua No, the .js files don't get committed. Those files get generated from the gulp build process, which runs as part of deployment, but we don't check them in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants