Repository: freedomofpress/securedrop

Issue:
localization: various problems
# Bug

## Description

This issue is to collect the various localization problems found before the 0.4.4 release and after the **string freeze**

They should be fixed in a pull request right after the 0.4.4 release.


Discussion:
source_app/forms.py:14 
"**Field must be between 1 and {max_codename_len} characters long.** " 
- Input in field? 
- Also ends in whitespace after dot.

source_templates/index.html:18 
"**<strong> We recommend using Tor Browser to access SecureDrop:</strong> 2 <a id="recommend-tor" href="{tor_browser_url}"> 3Learn how to install it</a> 4, or ignore this warning to continue**."

- Needless "we" Suggesting "It is recommended to make use of the Tor brow…
- Could end in "without"


source_templates/index.html:94
 "**Click the <img src="{icon}" alt="Tor icon"> Tor icon in the toolbar above**" 
- Doesn't end in dot (?), don't know if it should. 
- ending in above to the left, is where it actually is, could be good.
- Change to "the green onion, because that is consistent with:

source_templates/logout_flashed_message.html:5
 "**Please select "New Identity" from the green Onion button in the Tor browser**"
- Should be onion, not Onion.
* journalist_templates/delete.html:23 tripledots when it should use ellipsis …
* source_templates/index.html:17 the second "High" is "high", when it should not be
* securedrop/translations/nb_NO/LC_MESSAGES/messages.po, oversettelsesenhet 183    could be "all keys are encrypted upon reception in securedrop"
* source_templates/why-journalist-key.html:7   i think ".asc" should be in quotemarks here
@comradekingu 

>  source_app/forms.py:14
>  "Field must be between 1 and {max_codename_len} characters long. "
> 
>   Input in field?

The context in which the line shows is non ambiguous, I don't think there is a need to clarify.

![a](https://user-images.githubusercontent.com/433594/32217942-bd297a1e-be29-11e7-809b-501e6817446e.png)

>   Also ends in whitespace after dot.

Good catch ! Fixed.
> source_templates/index.html:94
>  "**Click the <img src="{icon}" alt="Tor icon"> Tor icon in the toolbar above**" 
> - Doesn't end in dot (?), don't know if it should. 

It is part of a list of steps and not having a trailing dot is deliberate.

> - ending in above to the left, is where it actually is, could be good.

The arrow points precisely to the onion image, I think it is enough.

![source-turn-slider-to-high](https://user-images.githubusercontent.com/433594/32218422-1adbc06c-be2b-11e7-850c-5d010bc35023.png)

> - Change to "the green onion, because that is consistent with:

As you can see in the image above, the green onion is already present as an image and repeating "green onion" right after would not help much.
> source_templates/logout_flashed_message.html:5
>  "**Please select "New Identity" from the green Onion button in the Tor browser**"
> - Should be onion, not Onion.

Good catch ! Fixed.
> * journalist_templates/delete.html:23 tripledots when it should use ellipsis …

Done

> * source_templates/index.html:17 the second "High" is "high", when it should not be

It is deliberate because it is a reference to the menu entry that reads "High" and not the general idea of security to be high. Maybe it should be in <code></code> to clarify ?

> * securedrop/translations/nb_NO/LC_MESSAGES/messages.po, oversettelsesenhet 183    could be "all keys are encrypted upon reception in securedrop"

I don't remember what this meant @comradekingu could you please clarify if you do ? I should have paid attention more when I copy/pasted...

> * source_templates/why-journalist-key.html:7   i think ".asc" should be in quotemarks here

It was decided to use <code></code> to display words that have a special meaning.

Resolving patch:
diff --git a/securedrop/source_app/forms.py b/securedrop/source_app/forms.py
--- a/securedrop/source_app/forms.py
+++ b/securedrop/source_app/forms.py
@@ -11,7 +11,7 @@ class LoginForm(FlaskForm):
         InputRequired(message=gettext('This field is required.')),
         Length(1, Source.MAX_CODENAME_LEN,
                message=gettext('Field must be between 1 and '
-                               '{max_codename_len} characters long. '.format(
+                               '{max_codename_len} characters long.'.format(
                                    max_codename_len=Source.MAX_CODENAME_LEN))),
         # Make sure to allow dashes since some words in the wordlist have them
         Regexp(r'[\sA-Za-z0-9-]+$', message=gettext('Invalid input.'))


Test patch: