changed i18n to use seperate translate module which holds the translations

This commit is contained in:
Henry Oswald 2014-03-26 16:35:13 +00:00
parent 4298c862cb
commit ebacf86485
6 changed files with 5 additions and 282 deletions

View file

@ -15,8 +15,7 @@ sessionStore = new RedisStore(host:Settings.redis.web.host, port:Settings.redis.
cookieParser = express.cookieParser(Settings.security.sessionSecret)
oneDayInMilliseconds = 86400000
ReferalConnect = require('../Features/Referal/ReferalConnect')
i18n = require("i18next")
i18n.init(resGetPath: 'locales/__lng__.json')
translations = require "translations"
Monitor = require "./Monitor"
@ -42,7 +41,7 @@ app.configure ()->
app.set 'views', __dirname + '/../../views'
app.set 'view engine', 'jade'
app.use express.bodyParser(uploadDir: __dirname + "/../../../data/uploads")
app.use i18n.handle
app.use translations.expressMiddlewear
app.use cookieParser
app.use express.session
proxy: true

View file

@ -87,7 +87,7 @@ block content
a.normalText.menu-indent(href="/templates/thesis") Thesis
li
a.normalText.menu-indent(href="/templates/bibliographies") Bibliographies
h1 Projects
h1 #{translate("projects")} translate
- if (projects.length > 0)
.row-fluid
.span9

View file

@ -1,3 +0,0 @@
{
"project":"German Project"
}

View file

@ -1,136 +0,0 @@
{
"projects": "Projects",
"account_settings": "Account Settings",
"search_projects": "Search projects",
"add_tag": "Add Tag",
"tags": "tags",
"actions:":"Actions",
"clone_project":"Clone Project",
"delete_project":"Delete Project",
"download_zip":"Download Zip",
"new_project":"New Project",
"blank_project":"Blank Project",
"example_project":"Example Project",
"upload_zipped_project":"Upload Zipped Project",
"from_template":"From Template",
"cv_or_resume":"CV or Resume",
"cover_letter":"Cover Letter",
"journal_article":"Journal Article",
"presentation":"Presentation",
"thesis":"Thesis",
"bibliographies":"Bibliographies",
"sharelatex_is_open_source":"ShareLaTeX is open source",
"fork_us_on_github":"Fork us on Github",
"terms_of_service":"Terms of Service",
"privacy_policy":"Privacy Policy",
"plans_and_pricing":"Plans & Pricing",
"university_licences":"University Licenses",
"security":"Security",
"contact_us":"Contact us",
"thanks":"Thanks",
"blog":"Blog",
"latex_editor":"LaTeX Editor",
"get_free_stuff":"Get free stuff",
"recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.",
"chat":"Chat",
"no_one_else_online":"No one else is online",
"your_message":"Your Message",
"loading":"Loading",
"loading_editor":"Loading Editor",
"connecting":"Connecting",
"new":"new",
"recompile":"Recompile",
"back_to_pdf":"Back to PDF",
"download":"Download",
"share_privately_via_email":"Share Privately (via email)",
"email":"Email",
"privlages":"Privileges",
"owner":"Owner",
"read_and_write":"Read and Write",
"read_only":"Read Only",
"add_new_collaborator":"Add New Collaborator",
"share_publicly":"Share Publicly",
"share_on_twitter":"Share on Twitter",
"share_on_facebook":"Share on Facebook",
"share_on_google_plus":"Share on Google+",
"share_url":"Share URL",
"publish":"Publish",
"publish_project_as_template":"Publish project as template",
"your_project_currently_published":"Your project is currently published",
"view_in_template_gallery":"View in template gallery",
"latest_version":"Lastest version",
"description":"Description",
"unpublish":"Unpublish",
"re-publish":"Re-Publish",
"problem_publishing":"There is a problem with our publishing service, please try again in a few minutes.",
"working":"Working",
"hotkeys": "Hot Keys",
"editor_tour":"Editor Tour",
"saving":"Saving",
"cancel":"cancel",
"project_settings":"Project Settings",
"general":"General",
"project_name":"Project Name",
"root_document":"Root Document",
"spell_check":"Spell check",
"compiler":"Compiler",
"public_access":"Public Access",
"private":"Private",
"public":"Public",
"export_and_copy":"Export and Copy",
"download_project_as_zip":"Download project as Zip",
"delete_forever":"Delete Forever",
"confirm_delete_project":"Are you sure you want to delete this project?",
"support_and_feedback":"Support and feedback",
"help":"Help",
"latex_templates":"LaTeX Templates",
"info":"Info",
"latex_help_guide":"LaTeX help guide",
"latex_resources":"LaTeX Resources",
"choose_your_plan":"Choose your plan",
"indvidual_plans":"Individual Plans",
"free_forever":"Free forever",
"low_priority_compile":"Low priority compiling",
"unlimited_projects":"Unlimited projects",
"unlimited_compiles":"Unlimited compiles",
"full_history_of_changes":"Full history of changes",
"highest_priority_compiling":"Highest priority compiling",
"dropbox_sync":"Dropbox Sync",
"beta":"Beta",
"google_drive_intergration":"Google Drive integration",
"coming_soon":"coming soon",
"git_access":"Git access",
"sign_up_now":"Sign Up Now",
"multi_team_members":"__count__ team members",
"you_plus_multi_free_users":"You + __count__ free users per project",
"group_plans":"Group Plans",
"annual":"Annual",
"half_price_student":"Half price student plans",
"about_us":"About Us",
"meet_team_behind_sl":"Meet the team behind your favourite online LaTeX editor",
"about_henry_oswald":"Henry Oswald built an experimental LaTeX editor in 2011 which later became ShareLaTeX. He is a trained software engineer who lives in London. Henry has been responsible for building up a reliable platform for ShareLaTeX that allows instant real-time collaboration. Henry is a strong advocate of Test Driven Development and makes sure we keep the ShareLaTeX code clean and easy to maintain.",
"about_james_allen":"James Allen started working with Henry early in 2012 and finished his PhD in theoretical physics early in 2013. James began working on one of the first online LaTeX editors, ScribTeX, in 2008 and he has played a large role in developing the technologies and concepts that made ScribTeX and now ShareLaTeX possible. James is also slightly too obsessed with typography and learning the internals of how LaTeX works.",
"motivation_behind_sl":"Our first priority with ShareLaTeX is to build a tool which makes life easier for all the LaTeX users out there. The 'thank you's and success stories are a strong motivator for us, and we hope to always be able to offer a fully-functional LaTeX editor which anyone can use for free. \n We also believe that charging money for tools like ShareLaTeX is important since it helps to guarantee the future of the site and the safety of your work, as well as allowing us to focus on it full time to develop new features. We prefer to provide a valuable service at a fair price rather than having to try run the site from adverts, or worse. As our customers, we are answerable to you and only you.",
"technologies":"Technologies",
"about_technology":"We use a lot of exciting technologies to run ShareLaTeX. We have mutliple APIs behind the scenes that we've written in Node.js, but the one exception is our open sourced compiler API. This is written in Ruby on Rails. We generally write in coffee-script as we find it helps to speed up development and make our code more readable. Your data is stored in MongoDB, Redis and Amazon S3. We practice Test Driven Development (TDD) to help produce robust and clean code which is easy to refactor.",
"attribution":"Attribution",
"thanks_to_open_source_components":"We've only been able to create ShareLaTeX thanks to the many amazing free and open source technologies that exist. Here are some that we have been using and would like to say thank you to:",
"about_nodejs_and_npm":"and the massive set of modules that are available",
"about_pdfjs_list_view":"A wrapper for PDF.js that powers our built in PDF viewer",
"about_bootstrap":"for letting us survive without being designers"
}

View file

@ -1,137 +0,0 @@
{
"projects": "name for all the projects seen at https://www.sharelatex.com/project",
"account_settings": "seen in left hand menu at https://www.sharelatex.com/project ",
"search_projects": "used for the place holder in the search field at https://www.sharelatex.com/project",
"add_tag": "used for the button to add tags to a project at https://www.sharelatex.com/project",
"tags": "header for all the shown tags on https://www.sharelatex.com/project",
"actions:":"button text used to show different actions that can be done on a project https://www.sharelatex.com/project",
"clone_project":"trigger the cloning/copying of a project https://www.sharelatex.com/project",
"delete_project":"delete a project https://www.sharelatex.com/project",
"download_zip":"download a project as a zip https://www.sharelatex.com/project",
"new_project":"button for new project https://www.sharelatex.com/project",
"blank_project":"create a blank project https://www.sharelatex.com/project",
"example_project":"create an example project https://www.sharelatex.com/project",
"upload_zipped_project":"create a project uploaded from a zip https://www.sharelatex.com/project",
"from_template":"sub heading used for creating a new proejct from a template https://www.sharelatex.com/project",
"cv_or_resume":"CV or Resume section",
"cover_letter":"Cover Letter section",
"journal_article":"Journal Article section",
"presentation":"Presentation section",
"thesis":"Thesis section",
"bibliographies":"Bibliographies section",
"sharelatex_is_open_source":"announcment that ShareLaTeX is open source",
"fork_us_on_github":"used to link to our github repo",
"terms_of_service":"Terms of Service",
"privacy_policy":"Privacy Policy",
"plans_and_pricing":"Plans & Pricing",
"university_licences":"University Licenses",
"security":"Security",
"contact_us":"Contact us",
"thanks":"Thanks",
"blog":"Blog",
"latex_editor":"LaTeX Editor",
"get_free_stuff":"Get free stuff",
"recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.",
"chat":"Chat",
"no_one_else_online":"message telling people no one is on-line inside the editor",
"your_message":"place holder for the message sending box",
"loading":"loading message when entering the editor",
"loading_editor":"loading message when entering the editor",
"connecting":"loading message when entering the editor",
"new":"new",
"recompile":"button to compile the pdf when inside the editor",
"back_to_pdf":"Back to PDF",
"download":"Download",
"share_privately_via_email":"Share Privately (via email)",
"email":"Email",
"privlages":"Privileges",
"owner":"Owner",
"read_and_write":"Read and Write",
"read_only":"Read Only",
"add_new_collaborator":"Add New Collaborator",
"share_publicly":"Share Publicly",
"share_on_twitter":"Share on Twitter",
"share_on_facebook":"Share on Facebook",
"share_on_google_plus":"Share on Google+",
"share_url":"Share URL",
"publish":"Publish",
"publish_project_as_template":"Publish project as template",
"your_project_currently_published":"Your project is currently published",
"view_in_template_gallery":"View in template gallery",
"latest_version":"Latest version",
"description":"Description",
"unpublish":"Unpublish",
"re-publish":"Re-Publish",
"problem_publishing":"There is a problem with our publishing service, please try again in a few minutes.",
"working":"message telling the user that the system is working at the moment",
"hotkeys": "link to display hot keys",
"editor_tour":"link to start tour",
"saving":"message that the project is being saved",
"cancel":"generically used throughout lots of pop ups to cancel the event",
"project_settings":"Header used at top of project settings",
"general":"header used for general part of project settings",
"project_name":"label used for project name field",
"root_document":"label used for root document dropdown menu",
"spell_check":"label used for selecting the spell check",
"compiler":"label used for selecting compiler",
"public_access":"value for setting a project to have public access",
"private":"value for setting a project to be private",
"public":"value for setting project to be public",
"export_and_copy":"label for Export and Copying project options",
"download_project_as_zip":"Download project as Zip",
"delete_forever":"button texts used to confirm that the user wants to delete the project forever (no going back)",
"confirm_delete_project":"message asking the user if they do want to delete the project",
"support_and_feedback":"header at top of every page for linking to Support and feedback",
"help":"header at top of every page for linking to Help",
"latex_templates":"header at top of every page for linking to LaTeX Templates",
"info":"header at top of every page for linking to Info",
"latex_help_guide":"header at top of every page under the info dropbox linking to LaTeX help guide",
"latex_resources":"header at top of every page under the info dropbox linking to LaTeX Resources",
"choose_your_plan":"Choose your plan https://www.sharelatex.com/user/subscription/plans ",
"indvidual_plans":"Individual Plans https://www.sharelatex.com/user/subscription/plans",
"free_forever":"Free forever https://www.sharelatex.com/user/subscription/plans",
"low_priority_compile":"Low priority compiling https://www.sharelatex.com/user/subscription/plans",
"unlimited_projects":"Unlimited projects https://www.sharelatex.com/user/subscription/plans",
"unlimited_compiles":"Unlimited compiles https://www.sharelatex.com/user/subscription/plans",
"full_history_of_changes":"Full history of changes https://www.sharelatex.com/user/subscription/plans",
"highest_priority_compiling":"Highest priority compiling https://www.sharelatex.com/user/subscription/plans",
"dropbox_sync":"Dropbox Sync https://www.sharelatex.com/user/subscription/plans",
"beta":"used as a label when a feature is in Beta",
"google_drive_intergration":"Google Drive integration https://www.sharelatex.com/user/subscription/plans",
"coming_soon":"used as a label when a feature is coming soon",
"git_access":"Git access",
"sign_up_now":"Sign Up Now button on https://www.sharelatex.com/user/subscription/plans to sign up now",
"multi_team_members":"__count__ team members https://www.sharelatex.com/user/subscription/plans ",
"you_plus_multi_free_users":"You + __count__ free users per project https://www.sharelatex.com/user/subscription/plans",
"group_plans":"Group Plans https://www.sharelatex.com/user/subscription/plans",
"annual":"Annual used for annual subscriptions",
"half_price_student":"Half price student plans",
"about_us":"About Us header used for the about us page https://www.sharelatex.com/about",
"meet_team_behind_sl":"opening blurb for about us page https://www.sharelatex.com/about",
"about_henry_oswald":"about Henry - https://www.sharelatex.com/about",
"about_james_allen":"about James - https://www.sharelatex.com/about",
"motivation_behind_sl":"motivation behind ShareLaTeX - https://www.sharelatex.com/about",
"technologies":"header for technologies field",
"about_technology":"paragraph about the technologies we use",
"attribution":"header for Attribution page - https://www.sharelatex.com/attribution",
"thanks_to_open_source_components":"thanks to open source - https://www.sharelatex.com/attribution",
"about_nodejs_and_npm":"https://www.sharelatex.com/attribution",
"about_pdfjs_list_view":"https://www.sharelatex.com/attribution",
"about_bootstrap":"https://www.sharelatex.com/attribution"
}

View file

@ -28,6 +28,7 @@
"mixpanel": "0.0.18",
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#master",
"translations-sharelatex": "git+https://henryoswald@bitbucket.org/henryoswald/translations-sharelatex.git#master",
"soa-req-id": "git+https://github.com/sharelatex/soa-req-id.git#master",
"fairy": "0.0.2",
"node-uuid": "1.4.0",
@ -37,8 +38,7 @@
"archiver": "0.5.1",
"nodetime": "0.8.15",
"mocha": "1.17.1",
"redback": "0.3.7",
"i18next": "~1.7.1"
"redback": "0.3.7"
},
"devDependencies": {
"chai": "",