rinatkhaziev / wp-frontend-uploader

WordPress plugin that allows your visitors to upload media from the front-end
53 stars 52 forks source link

Ensure these strings are using translation functions too #33

Closed danielbachhuber closed 11 years ago

danielbachhuber commented 11 years ago

On http://journalmetro.com/metro-flirt-envoyer/, the labels associated with the fields aren't being translated. This pull request fixes the translation of 'Author' but not "Title (Required)" or "Description (Required)".

Any idea why that might be the case? I suspect it might be the parens in the string.

rinatkhaziev commented 11 years ago

Thanks Daniel. Do you want commit access?

danielbachhuber commented 11 years ago

Sure. Any idea why the other two fields aren't translating?

rinatkhaziev commented 11 years ago

They might be assigned via shortcode default.

rinatkhaziev commented 11 years ago

E.g. from readme

[fu-upload-form class="your-class" title="Upload your media"] [textarea name="caption" class="textarea" id="ug_caption" description="Description (optional)"] [input type="file" name="photo" id="ug_photo" class="required" description="Your Photo" multiple=""] [input type="submit" class="btn" value="Submit"] [/fu-upload-form]

rinatkhaziev commented 11 years ago

Can you double check that's not the case?

rinatkhaziev commented 11 years ago

What's wrong with parens in the string?

danielbachhuber commented 11 years ago

Not sure. It's the text with parens that's not being translated. They aren't passing any strings in their shortcode

On Feb 9, 2013, at 15:35, Rinat K notifications@github.com wrote:

What's wrong with parens in the string?

\ Reply to this email directly or view it on GitHub..

rinatkhaziev commented 11 years ago

Looking into it

rinatkhaziev commented 11 years ago

Confirmed, it was parens. Replaced affected strings with "Title" and "Description"

danielbachhuber commented 11 years ago

Why does localization break with parens? Should we sprintf the required bit in?

On Feb 9, 2013, at 17:37, Rinat K notifications@github.com wrote:

Confirmed, it was parens. Replaced affected strings with "Title" and "Description"

\ Reply to this email directly or view it on GitHub..

rinatkhaziev commented 11 years ago

I have no idea, this was my first ever localization. May be there's some caveats, I tried to google, but didn't find any specific. But then again, I wasn't trying hard.

Yea I think sprintf will be fine, and just add 2 more strings: required and optional