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

Stay Logged In Plugin #8689

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open

Conversation

Github-Citizen
Copy link
Contributor

This plugin will add a toggle switch to the login page for the Elastic skin allowing users the option to stay logged in to Roundcube for days even after closing the browser. This does not create any extra 'record keeping' or objects. It simply extends the expiration time of the existing cookies Roundcube already uses to login users.

To the Roundcube team;
I want to give this plugin to the project (just to give back) and I claim no credit. Feel free to claim and polish the comments to add whatever license or copyright notices needed.

The limited language localization files were created using google translate and could use love from the community.

@alecpl
Copy link
Member

alecpl commented Sep 24, 2022

A few general notes:

  1. The code style is not our code style
  2. No need to add localizations other than en_US (especially if they are machine-generated). They will be automatically removed when we sync localization from Transifex.
  3. Might not be a problem but we do not use spaces in the localization label.
  4. .tx/config would need to be updated.

@Github-Citizen
Copy link
Contributor Author

  1. What do you mean by "code style"? What needs to be changed?
  2. Okay, i will delete them.
  3. The reason for the space is because if a localization file doesn't exist for the user's selected language it will show the label name on the webpage. With a space it is human friendly / readable instead of looking like a variable_code to the end user.
  4. I don't understand. .tx/config? What is that? Updated to what?

@alecpl
Copy link
Member

alecpl commented Sep 25, 2022

  1. What do you mean by "code style"? What needs to be changed?

I mean that Roundcube code style is different. Look at the code in other places.

3. The reason for the space is because if a localization file doesn't exist for the user's selected language it will show the label name on the webpage. With a space it is human friendly / readable instead of looking like a variable_code to the end user.

No, the en_US will be displayed (unless it's also undefined, but this should not happen).

4. I don't understand. `.tx/config`? What is that? Updated to what?

The file contains definitions for Transifex. The new plugin would need to be added there.

@Github-Citizen
Copy link
Contributor Author

Github-Citizen commented Sep 25, 2022

No, the en_US will be displayed (unless it's also undefined, but this should not happen).

I see that now, i must have not had the en_US set in my testing. Label has been adjusted.

The file contains definitions for Transifex. The new plugin would need to be added there.

Added.

I mean that Roundcube code style is different. Look at the code in other places.

I do not know how to resolve the style issue. This is vague to me and i don't understand what you mean. Is it because i used tabs instead of spaces? Is it because you don't like the syntax of the PHP methods used? Is it the names of the functions and variables? Or is it how the #comments look?

Do you want to make the "style" edits necessary? I am donating this plugin to the project and are completely fine with the round cube team editing the code.

Or if you can give an example of a style edit required i can try to figure out the rest. Otherwise im at a loss of how to resolve this last issue.

@codegain
Copy link
Contributor

@Github-Citizen Take a look at https://github.com/roundcube/roundcubemail/wiki/Dev-Guidelines#naming-conventions

For example:

  • Opening and closing brackets for function and class definitions are on a new line
  • Indentation consists of 4 spaces per level and no tabs!
  • Never write control-flow code on a line
  • From PEAR CS: https://pear.php.net/manual/en/standards.comments.php
    • C style comments (/* */) and standard C++ comments (//) are both fine. Use of Perl/shell style comments (#) is discouraged.

If you look at other plugins in roundcube like f.e. markasjunk you can clearly see a difference in code style from your plugin.

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.

3 participants