Skip to content

Commit

Permalink
signup modal string
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsam committed Oct 8, 2024
1 parent 6bc9cd3 commit c6304aa
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 137 deletions.
2 changes: 1 addition & 1 deletion static/js/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ const MobileNavMenu = ({onRefClick, showSearch, openTopic, openURL, close, visib

<a href="/help">
<img src="/static/icons/help.svg" />
<InterfaceText>get_help</InterfaceText>
<InterfaceText>text.feedback.get_help</InterfaceText>
</a>

{Sefaria._uid ?
Expand Down
14 changes: 5 additions & 9 deletions static/js/Misc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2014,11 +2014,10 @@ LoginPrompt.propTypes = {
class SignUpModal extends Component {
render() {
let modalContent = !this.props.modalContentKind ? generateContentForModal() : generateContentForModal(this.props.modalContentKind);

const innerContent = modalContent.contentList.map(bullet => (
<div key={bullet.icon}>
<img src={`/static/img/${bullet.icon}`} alt={bullet.bulletContent.en} />
<InterfaceText text={bullet.bulletContent} />
<img src={`/static/img/${bullet.icon}`} />
<InterfaceText>{bullet.bulletContent}</InterfaceText>
</div>
));
const nextParam = "?next=" + encodeURIComponent(Sefaria.util.currentPath());
Expand All @@ -2030,19 +2029,16 @@ class SignUpModal extends Component {
<div id="interruptingMessageClose" className="sefariaModalClose" onClick={this.props.onClose}>×</div>
<div className="sefariaModalContent">
<h2 className="serif sans-serif-in-hebrew">
<InterfaceText text={modalContent.h2} />
<InterfaceText>{modalContent.h2}</InterfaceText>
</h2>
<h3>
<InterfaceText text={modalContent.h3} />
<InterfaceText>{modalContent.h3}</InterfaceText>
</h3>
<div className="sefariaModalInnerContent">
{ innerContent }
</div>
<a className="button white control-elem" href={"/register" + nextParam}>
<InterfaceText>
<EnglishText>Sign Up</EnglishText>
<HebrewText>ཐོ་འགོད་གྱིས།</HebrewText>
</InterfaceText>
<InterfaceText>common.sign_up</InterfaceText>
</a>
<div className="sefariaModalBottomContent">
<InterfaceText>{ Sefaria._("sign_up.already_have_account")} </InterfaceText>&nbsp;
Expand Down
13 changes: 11 additions & 2 deletions static/js/sefaria/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ import { initReactI18next } from 'react-i18next'
import Sefaria from './sefaria'
import LanguagesJson from './localizationLanguage/combineSring'

console.log("ang: ", Sefaria.interfaceLang)

const langs = {
hebrew: "bo",
chinese: "zh",
english: "en"
}

let current_lang =
i18n
.use(Languagedetector)
.use(initReactI18next)
.init({
lng: Sefaria.interfaceLang,
lng: langs[Sefaria.interfaceLang],
fallbackLng: 'en',
debug: true,
debug: false,
resources: { ...LanguagesJson}
})

Expand Down
23 changes: 22 additions & 1 deletion static/js/sefaria/localizationLanguage/chinese.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,28 @@
"feedback.message.error_sending_feedback": "很遗憾,发送反馈时发生错误。请重试或重新加载此页面。",
"common.select_type": "选择类型",
"sheet.source_sheet.added_by": "由...添加",
"modal.sign_up.love_learning": "热爱学习?",
"modal.sign_up.default.love_learning":"སློབ་གཉེར་ལ་དགའ་བོ་ཡོད་དམ།",
"modal.sign_up.default.sign_up__to_get_more_from_sefaria":"",
"model.sign_up.add_connection.connection_to_another_text": "",
"model.sign_up.add_connection.create_free_account": "",
"model.sign_up.add_connection.content_list.add_interconnection_and_translation": "",
"model.sign_up.add_connection.content_list.build_and_share_source_sheet": "",
"model.sign_up.add_connection.content_list.take_notes": "",
"model.sign_up.add_connection.content_list.get_updates_on_new_texts": "",
"model.sign_up.add_to_sheet.want_to_make_your_own_source_sheet": "",
"model.sign_up.add_to_sheet.create_free_accout_to_join_conversation":"",
"model.sign_up.add_to_sheet.build_share_souce_sheet":"",
"model.sign_up.add_to_sheet.connect_with_other_users":"",
"model.sign_up.add_translation.have_your_own_translation_of_this_text":"",
"model.sign_up.add_translation.create_free_account__to_add_it_to_library":"",
"model.sign_up.follow.want_to_connect_with_other_users":"",
"model.sign_up.follow.follow_your_favorite_creaters":"",
"model.sign_up.follow.send_messages": "",
"model.sign_up.note.dont_lose_that_thought": "",
"model.sign_up.note.take_notes_on_this_text": "",
"model.sign_up.note.get_updates_on_new_features": "",
"model.sign_up.save.want_to_return_to_this_text": "",
"model.sign_up.save.view_your_reading_history": "",
"modal.sign_up.signup_to_get_more_from_pecha": "注册以从 Sefaria 获取更多内容",
"sheet.make_source_sheet": "创建资源表",
"note.take_note": "记笔记",
Expand Down
6 changes: 3 additions & 3 deletions static/js/sefaria/localizationLanguage/combineSring.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import englishJson from "./english.json";

// combine all languages string
const LanguagesJson = {
hebrew: {translation: tibetanJson},
chinese:{translation: chineseJson},
english:{translation: englishJson}
en:{translation: englishJson},
bo: {translation: tibetanJson},
zh:{translation: chineseJson}
};

export default LanguagesJson;
26 changes: 25 additions & 1 deletion static/js/sefaria/localizationLanguage/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,31 @@
"feedback.message.error_sending_feedback":"Unfortunately, there was an error sending this feedback. Please try again or try reloading this page.",
"common.select_type":"Select Type",
"sheet.source_sheet.added_by":"Added by",
"modal.sign_up.love_learning":"Love Learning?",

"modal.sign_up.default.love_learning":"Love Learning?",
"modal.sign_up.default.sign_up__to_get_more_from_sefaria":"Sign up to get more from Sefaria",

"model.sign_up.add_connection.connection_to_another_text": "Want to document a connection to another text?",
"model.sign_up.add_connection.create_free_account": "Create a free account to do more on Sefaria",
"model.sign_up.add_connection.content_list.add_interconnection_and_translation": "Add interconnections & translations",
"model.sign_up.add_connection.content_list.build_and_share_source_sheet": "Build & share source sheets",
"model.sign_up.add_connection.content_list.take_notes": "Take notes",
"model.sign_up.add_connection.content_list.get_updates_on_new_texts": "Get updates on new texts",
"model.sign_up.add_to_sheet.want_to_make_your_own_source_sheet": "Want to make your own source sheet?",
"model.sign_up.add_to_sheet.create_free_accout_to_join_conversation":"Create a free account to join the conversation",
"model.sign_up.add_to_sheet.connect_with_other_users":"Connect with other users",
"model.sign_up.add_translation.have_your_own_translation_of_this_text":"Have your own translation of this text?",
"model.sign_up.add_translation.create_free_account__to_add_it_to_library":"Create a free account to add it to the library & do more on Sefaria",
"model.sign_up.follow.want_to_connect_with_other_users":"Want to connect with other Sefaria users?",
"model.sign_up.follow.follow_your_favorite_creaters":"Follow your favorite creators",
"model.sign_up.follow.send_messages": "Send messages",
"model.sign_up.note.dont_lose_that_thought": "Don’t lose that thought!",
"model.sign_up.note.take_notes_on_this_text": "Take notes on this text",
"model.sign_up.note.get_updates_on_new_features": "Get updates on new features",
"model.sign_up.save.want_to_return_to_this_text": "Want to return to this text?",
"model.sign_up.save.view_your_reading_history": "View your reading history",


"modal.sign_up.signup_to_get_more_from_pecha":"Sign up to get more from Sefaria",
"sheet.make_source_sheet":"Make source sheets",
"note.take_note":"Take notes",
Expand Down
25 changes: 24 additions & 1 deletion static/js/sefaria/localizationLanguage/tibetan.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,30 @@
"feedback.message.error_sending_feedback":"སྟབས་མ་ལེགས་པ་ཞིག་ལ་བསམ་འཆར་འདི་གཏོང་བ་ལ་གནད་དོན་ཞིག་བྱུང་སོང་། ཤོག་ངོས་འདི་བསྐྱར་ལེན་ནམ་ཡང་ན་བསྐྱར་དུ་ཚོད་ལྟ་ཞིག་བྱེད་རོགས།",
"common.select_type":"རིགས་དབྱེ།",
"sheet.source_sheet.added_by":"ཡིས་བསྣན་འདུག",
"modal.sign_up.love_learning":"སློབ་གཉེར་ལ་དགའ་བོ་ཡོད་དམ།",

"modal.sign_up.default.love_learning":"སློབ་གཉེར་ལ་དགའ་བོ་ཡོད་དམ།",
"modal.sign_up.default.sign_up__to_get_more_from_sefaria":"དཔེ་ཆ་དྲ་ཐོག་དཔེ་མཛོད་ནས་འདི་ལས་མང་བ་ཐོབ་པ་ལ་ཞུགས་ཐོ་གསར་འགོད་བྱོས།",
"model.sign_up.add_connection.connection_to_another_text": "",
"model.sign_up.add_connection.create_free_account": "",
"model.sign_up.add_connection.content_list.add_interconnection_and_translation": "",
"model.sign_up.add_connection.content_list.build_and_share_source_sheet": "",
"model.sign_up.add_connection.content_list.take_notes": "མཆན་བཀོད།",
"model.sign_up.add_connection.content_list.get_updates_on_new_texts": "",
"model.sign_up.add_to_sheet.want_to_make_your_own_source_sheet": "",
"model.sign_up.add_to_sheet.create_free_accout_to_join_conversation":"རིན་མེད་ཁ་བྱང་ཞིག་བཟོས་ཏེ་གླེང་མོལ་ནང་མཉམ་གཞུགས་བྱོས།",
"model.sign_up.add_to_sheet.build_share_souce_sheet":"ཤོག་ངོས་བཟོས་ཏེ་བརྒྱུད་སྐུར་བྱོས།",
"model.sign_up.add_to_sheet.connect_with_other_users":"གཞན་དང་མཉམ་དུ་སྦྲེལ་མཐུད་བྱེད།",
"model.sign_up.add_translation.have_your_own_translation_of_this_text":"",
"model.sign_up.add_translation.create_free_account__to_add_it_to_library":"",
"model.sign_up.follow.want_to_connect_with_other_users":"",
"model.sign_up.follow.follow_your_favorite_creaters":"",
"model.sign_up.follow.send_messages": "",
"model.sign_up.note.dont_lose_that_thought": "ཁྱེད་ཀྱི་གོ་རྟོགས་གསར་པ་དེ་མ་བརླགས་པར་བྱེད་དགོས།",
"model.sign_up.note.take_notes_on_this_text": "",
"model.sign_up.note.get_updates_on_new_features": "",
"model.sign_up.save.want_to_return_to_this_text": "",
"model.sign_up.save.view_your_reading_history": "",

"modal.sign_up.signup_to_get_more_from_pecha":"དཔེ་ཆ་དྲ་ཐོག་དཔེ་མཛོད་ནས་འདི་ལས་མང་བ་ཐོབ་པ་ལ་ཞུགས་ཐོ་གསར་འགོད་བྱོས།",
"sheet.make_source_sheet":"མ་ཕྱིའི་ཤོག་ངོས་བཟོས།",
"note.take_note":"མཆན་འགོད་པ།",
Expand Down
Loading

0 comments on commit c6304aa

Please sign in to comment.