def _set_translated_strings(self):
     """Set the translated strings."""
     self.setTitle(LOGIN_TITLE.format(app_name=self.app_name))
     self.setSubTitle(LOGIN_SUBTITLE % {'app_name': self.app_name})
     self.ui.email_label.setText(EMAIL_LABEL)
     self.ui.password_label.setText(LOGIN_PASSWORD_LABEL)
     forgotten_text = LINK_STYLE.format(link_url='#',
                         link_text=FORGOTTEN_PASSWORD_BUTTON)
     self.ui.forgot_password_label.setText(forgotten_text)
     link_text = CREATE_ACCOUNT_LABEL.format(app_name=self.app_name)
     account_text = LINK_STYLE.format(link_url='#', link_text=link_text)
     self.ui.create_account_label.setText(account_text)
     self.ui.sign_in_button.setText(SIGN_IN_BUTTON)
 def _set_translated_strings(self):
     """Set the translated strings."""
     self.setTitle(LOGIN_TITLE.format(app_name=self.app_name))
     self.setSubTitle(LOGIN_SUBTITLE % {'app_name': self.app_name})
     self.ui.email_label.setText(EMAIL_LABEL)
     self.ui.password_label.setText(LOGIN_PASSWORD_LABEL)
     forgotten_text = LINK_STYLE.format(link_url='#',
                                        link_text=FORGOTTEN_PASSWORD_BUTTON)
     self.ui.forgot_password_label.setText(forgotten_text)
     link_text = CREATE_ACCOUNT_LABEL.format(app_name=self.app_name)
     account_text = LINK_STYLE.format(link_url='#', link_text=link_text)
     self.ui.create_account_label.setText(account_text)
     self.ui.sign_in_button.setText(SIGN_IN_BUTTON)
Пример #3
0
    def _set_translated_strings(self):
        """Set the strings."""
        # set the translated string
        title_page = REGISTER_TITLE.format(app_name=self.app_name)
        self.setTitle(title_page)
        self.setSubTitle(self.help_text)

        self.ui.name_label.setText(NAME_ENTRY)
        sign_in_link = LINK_STYLE.format(link_url='#', link_text=SIGN_IN_LABEL)
        self.ui.sign_in_label.setText(sign_in_link)
        self.ui.email_label.setText(EMAIL1_ENTRY)
        self.ui.confirm_email_label.setText(EMAIL2_ENTRY)
        self.ui.password_label.setText(PASSWORD1_ENTRY)
        self.ui.confirm_password_label.setText(PASSWORD2_ENTRY)
        self.ui.password_edit.setToolTip(PASSWORD_HELP)
        self.ui.captcha_solution_edit.setPlaceholderText(
            CAPTCHA_SOLUTION_ENTRY)
        link = LINK_STYLE.format(link_url='#', link_text=CAPTCHA_RELOAD_TEXT)
        self.ui.refresh_label.setText(CAPTCHA_RELOAD_MESSAGE %
                                      {'reload_link': link})

        if self.tc_url:
            terms_links = LINK_STYLE.format(link_url=self.tc_url,
                                            link_text=TERMS_TEXT)
        if self.policy_url:
            privacy_policy_link = LINK_STYLE.format(
                link_url=self.policy_url, link_text=PRIVACY_POLICY_TEXT)

        terms = ''
        if self.tc_url and self.policy_url:
            terms = AGREE_TO_TERMS_AND_PRIVACY_POLICY.format(
                app_name=self.app_name,
                terms_and_conditions=terms_links,
                privacy_policy=privacy_policy_link)
        elif self.tc_url:
            terms = AGREE_TO_TERMS.format(app_name=self.app_name,
                                          terms_and_conditions=terms_links)
        elif self.policy_url:
            terms = AGREE_TO_PRIVACY_POLICY.format(
                app_name=self.app_name, privacy_policy=privacy_policy_link)

        self.terms_checkbox = enhanced_check_box.EnhancedCheckBox(terms, self)
        self.ui.hlayout_check.addWidget(self.terms_checkbox)
        self.terms_checkbox.setVisible(bool(self.tc_url or self.policy_url))

        self._register_fields()
    def _set_translated_strings(self):
        """Set the strings."""
        # set the translated string
        title_page = REGISTER_TITLE.format(app_name=self.app_name)
        self.setTitle(title_page)
        self.setSubTitle(self.help_text)

        self.ui.name_label.setText(NAME_ENTRY)
        sign_in_link = LINK_STYLE.format(link_url="#", link_text=SIGN_IN_LABEL)
        self.ui.sign_in_label.setText(sign_in_link)
        self.ui.email_label.setText(EMAIL1_ENTRY)
        self.ui.confirm_email_label.setText(EMAIL2_ENTRY)
        self.ui.password_label.setText(PASSWORD1_ENTRY)
        self.ui.confirm_password_label.setText(PASSWORD2_ENTRY)
        self.ui.password_edit.setToolTip(PASSWORD_HELP)
        self.ui.captcha_solution_edit.setPlaceholderText(CAPTCHA_SOLUTION_ENTRY)
        link = LINK_STYLE.format(link_url="#", link_text=CAPTCHA_RELOAD_TEXT)
        self.ui.refresh_label.setText(CAPTCHA_RELOAD_MESSAGE % {"reload_link": link})

        if self.tc_url:
            terms_links = LINK_STYLE.format(link_url=self.tc_url, link_text=TERMS_TEXT)
        if self.policy_url:
            privacy_policy_link = LINK_STYLE.format(link_url=self.policy_url, link_text=PRIVACY_POLICY_TEXT)

        terms = ""
        if self.tc_url and self.policy_url:
            terms = AGREE_TO_TERMS_AND_PRIVACY_POLICY.format(
                app_name=self.app_name, terms_and_conditions=terms_links, privacy_policy=privacy_policy_link
            )
        elif self.tc_url:
            terms = AGREE_TO_TERMS.format(app_name=self.app_name, terms_and_conditions=terms_links)
        elif self.policy_url:
            terms = AGREE_TO_PRIVACY_POLICY.format(app_name=self.app_name, privacy_policy=privacy_policy_link)

        self.terms_checkbox = enhanced_check_box.EnhancedCheckBox(terms, self)
        self.ui.hlayout_check.addWidget(self.terms_checkbox)
        self.terms_checkbox.setVisible(bool(self.tc_url or self.policy_url))

        self._register_fields()