elveos

elveos Commit Details

Date:2011-09-28 12:54:34 (1 year 7 months ago)
Author:Frédéric Bertolus
Branch:
Commit:27c0e7d95a064c413e06369b7d40eafe915e55d0
Parents: 128ac1505aca193286051367206f2cf0b12c66dc
Message:indicate that the description will be translatable

File differences

main/src/main/java/com/bloatit/web/linkable/features/create/CreateFeatureAndOfferPage.java
9292
9393        final HtmlTitleBlock offerPageContainer = new HtmlTitleBlock(Context.tr("Create a feature"), 1);
9494
95
96
9597        // Create offer form
9698        final CreateFeatureAndOfferActionUrl offerActionUrl = new CreateFeatureAndOfferActionUrl(getSession().getShortKey(), process);
9799        final HtmlForm offerForm = new HtmlForm(offerActionUrl.urlString());
98100
101        // Locale
102        offerForm.add(new LanguageField(offerActionUrl, //
103                                        Context.tr("Description language"), //
104                                        Context.tr("The language of the title and description. These texts can be translated in other language later.")));
105
106
99107        // Title of the feature
100108        final FieldData descriptionFieldData = offerActionUrl.getDescriptionParameter().pickFieldData();
101109        final HtmlTextField titleInput = new HtmlTextField(descriptionFieldData.getName(), tr("Title"));
...... 
144152        dateInput.addErrorMessages(dateData.getErrorMessages());
145153        dateInput.setComment(Context.tr("You will have to release this feature before the release date."));
146154        offerForm.add(dateInput);
147
155
148156        // Specification
149157        final FieldData specificationData = offerActionUrl.getSpecificationParameter().pickFieldData();
150158        final HtmlTextArea specificationInput = new HtmlTextArea(specificationData.getName(), Context.tr("Description"), 10, 80);
...... 
195203
196204        offerForm.add(licenseInput);
197205
198        // locale
199        offerForm.add(new LanguageField(offerActionUrl, //
200                                        Context.tr("description language"), //
201                                        Context.tr("The language of the description.")));
202206
203207        final HtmlDiv validationDetails = new HtmlDiv();
204208        final HtmlParagraph showHideLink = new HtmlParagraph(Context.tr("Show validation details"));
main/src/main/java/com/bloatit/web/linkable/features/create/CreateFeaturePage.java
5353    public static final int SPECIF_INPUT_NB_LINES = 20;
5454    public static final int SPECIF_INPUT_NB_COLUMNS = 100;
5555    public static final int FILE_MAX_SIZE_MIO = 2;
56
56
5757    @NonOptional(@tr("The process is closed, expired, missing or invalid."))
5858    @RequestParam(role = Role.PAGENAME)
5959    CreateFeatureProcess process;
60
61
60
6261    private final CreateFeaturePageUrl url;
63
62
6463    public CreateFeaturePage(final CreateFeaturePageUrl url) {
6564        super(url);
6665        this.url = url;
...... 
9493
9594        createFeatureTitle.add(createFeatureForm);
9695
96        // Locale
97        createFeatureForm.add(new LanguageField(doCreateUrl, //
98                                        Context.tr("Description language"), //
99                                        Context.tr("The language of the title and description. These texts can be translated in other language later.")));
100
97101        // Title of the feature
98102        final FieldData descriptionFieldData = doCreateUrl.getDescriptionParameter().pickFieldData();
99103        final HtmlTextField titleInput = new HtmlTextField(descriptionFieldData.getName(), tr("Title"));
...... 
113117            softwareInput.addDropDownElement(String.valueOf(software.getId()), software.getName());
114118        }
115119        softwareInput.setComment(Context.tr("On what software do you want to have this feature. Select 'new software' if your feature is the creation of a new software."));
116
120
117121        if (softwareFieldData.getSuggestedValue() != null) {
118122            softwareInput.setDefaultValue(softwareFieldData.getSuggestedValue());
119123        }
120
124
121125        createFeatureForm.add(softwareInput);
122126
123127        // As team input
...... 
160164        // Markdown previewer
161165        final MarkdownPreviewer mdPreview = new MarkdownPreviewer(specificationInput);
162166        createFeatureForm.add(mdPreview);
163
164        // Language
165        createFeatureForm.add(new LanguageField(doCreateUrl, tr("Description language"), tr("The language of the description you just wrote.")));
166167
167168        // Attachment
168169        createFeatureForm.add(new AttachmentField(doCreateUrl, FILE_MAX_SIZE_MIO + " Mio"));
main/src/main/java/com/bloatit/web/linkable/offer/MakeOfferPage.java
139139        dateInput.setComment(Context.tr("You will have to release this feature before the release date."));
140140        offerForm.add(dateInput);
141141
142        // locale
143        offerForm.add(new LanguageField(offerActionUrl, //
144                                        Context.tr("Description language"), //
145                                        Context.tr("The language of the offer description.")));
146
142147        // Description
143148        final FieldData descriptionData = offerActionUrl.getDescriptionParameter().pickFieldData();
144149        final MarkdownEditor descriptionInput = new MarkdownEditor(descriptionData.getName(), Context.tr("Description"), 10, 80);
...... 
171176
172177        offerForm.add(licenseInput);
173178
174        // locale
175        offerForm.add(new LanguageField(offerActionUrl, //
176                                        Context.tr("description language"), //
177                                        Context.tr("The language of the offer description.")));
178
179179        final HtmlDiv validationDetails = new HtmlDiv();
180180        final HtmlParagraph showHideLink = new HtmlParagraph(Context.tr("Show validation details"));
181181        showHideLink.setCssClass("fake_link");
main/src/main/java/com/bloatit/web/linkable/softwares/CreateSoftwarePage.java
8686        softwareNameInput.setComment(Context.tr("The name of the existing software."));
8787        addSoftwareForm.add(softwareNameInput);
8888
89        // Language
90        final FieldData languageData = doCreateUrl.getLangParameter().pickFieldData();
91        final LanguageSelector languageInput = new LanguageSelector(languageData.getName(), Context.tr("Language"));
92        languageInput.setDefaultValue(languageData.getSuggestedValue(), Context.getLocalizator().getLanguageCode());
93        languageInput.addErrorMessages(languageData.getErrorMessages());
94        languageInput.setComment(Context.tr("Language of the description. The description can be translated in other language later."));
95        addSoftwareForm.add(languageInput);
96
97
8998        // Description
9099        final FieldData descriptionData = doCreateUrl.getDescriptionParameter().pickFieldData();
91100        final MarkdownEditor descriptionInput = new MarkdownEditor(descriptionData.getName(),
...... 
101110        final MarkdownPreviewer mdPreview = new MarkdownPreviewer(descriptionInput);
102111        addSoftwareForm.add(mdPreview);
103112
104        // Language
105        final FieldData languageData = doCreateUrl.getLangParameter().pickFieldData();
106        final LanguageSelector languageInput = new LanguageSelector(languageData.getName(), Context.tr("Language"));
107        languageInput.setDefaultValue(languageData.getSuggestedValue(), Context.getLocalizator().getLanguageCode());
108        languageInput.addErrorMessages(languageData.getErrorMessages());
109        languageInput.setComment(Context.tr("Language of the description."));
110        addSoftwareForm.add(languageInput);
111113
112114        final HtmlFileInput softwareImageInput = new HtmlFileInput(CreateSoftwareAction.IMAGE_CODE, Context.tr("Software logo"));
113115        softwareImageInput.setComment("Optional. The logo must be an image on a usable license, in png with transparency for the background. The size must be inferior to 64px x 64px.");

Archive Download the corresponding diff file