http://projects.andriylesyuk.com/http://projects.andriylesyuk.com/plugin_assets/andriy_lesyuk/images/s-andy.ico2013-03-09T18:20:19ZProjectsContact Form - Feature #2169: Option to use own name, reply-to, subject and message fieldshttp://projects.andriylesyuk.com/issues/2169?journal_id=21052013-03-09T18:20:19ZAndriy Lesyuks-andy@andriylesyuk.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Incomplete</i></li></ul><p>Do you mean disable translation?</p> Contact Form - Feature #2169: Option to use own name, reply-to, subject and message fieldshttp://projects.andriylesyuk.com/issues/2169?journal_id=21082013-03-10T14:09:29ZRomain Schmitz
<ul></ul><p>Not at all.</p>
<p>I wish my redmine to always use the German translation but it’s just disrespecting the default language when the browser doesn’t define <em>de</em> in <code>Accept-Language de-de,de ...</code>.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>I propose to ask the user whether to use redmine’s fields or own fields. A pseudo code to illustrate what I mean:</p>
<pre><code><%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 %>
</code></pre>
<p>When the user doesn’t wish to use the original redmine fields, the user must have defined the appropriate custom fields for those.</p>
<p>I hope you got me.</p>
<p>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.</p>