I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Feature #2169

Option to use own name, reply-to, subject and message fields

Added by Romain Schmitz almost 12 years ago. Updated almost 12 years ago.

Status:
Incomplete
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09 Mar 2013
Due date:
% Done:

0%

External issue:

Description

Redmine is using the default language only when it cannot determine the language a user’s browser supports. E.g. if a browser sends the HTTP header Accept-Language en-us,en;q=0.5 then it won’t use the default language configured (de in my case) in the redmine settings.

This ends up with mixed languages in the contact form. It’d be nice if one can disable the default form fields full name, reply-to, subject and message.

History

#1 Updated by Andriy Lesyuk almost 12 years ago

  • Status changed from New to Incomplete

Do you mean disable translation?

#2 Updated by Romain Schmitz almost 12 years ago

Not at all.

I wish my redmine to always use the German translation but it’s just disrespecting the default language when the browser doesn’t define de in Accept-Language de-de,de ....

Most people think that the default language is permanently used but this hardly depends on the user’s browser which makes it difficult to always provide a website in a specific language no matter what the browser supports.

I need my website in German only but if the browser tells the server that it only understands English, the English translation of redmine’s view parts are provided.

In my case your plugin or more precisely its custom fields were in German as expected, but since you use the original redmine fields for the name, reply-to etc. they were provided in English.

I propose to ask the user whether to use redmine’s fields or own fields. A pseudo code to illustrate what I mean:

<%pseudo if (use_redmine_fields) then>
  <p><%= f.text_field(:full_name, :size => 30, :required => true) %></p>
  <p><%= f.text_field(:reply_to, :size => 30, :required => true) %></p>
  <p><%= f.text_field(:subject, :size => 80, :required => true) %></p>
  <p><%= f.text_area(:message, :cols => 80, :rows => 15,
                     :class => Setting.plain_text_mail? ? '' : 'wiki-edit',
                     :required => true, :accesskey => accesskey(:edit)) %></p>
<%pseudo end>

  <% email.custom_field_values.each do |value| %>
    <p><%= custom_field_tag_with_label(:contact_form, value) %></p>
  <% end %>

When the user doesn’t wish to use the original redmine fields, the user must have defined the appropriate custom fields for those.

I hope you got me.

There are surely tons of better solutions but I’m not a ruby programmer and I feel hard to like its syntax at the moment.

Also available in: Atom PDF

Terms of use | Privacy policy