OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



translate button Choosen File

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

translate button Choosen File

Postby cristianviza » Mon Oct 07, 2013 7:50 am

Hello everybody.

I work in translated my ojs to spanish (all parts ojs), and i need translated button html "choosen file". Well, I was able to do the translation: http://subefotos.com/ver/?49beb804aec70cd11edd7d4b455eb418o.png#codigos.

I add this codes:

in:
/lib/pkp/templates/common/header.tpl :
javascript
Code: Select all
$(document).ready(
function() {
$('#button').click(function(){
   $("input[type='file']").trigger('click');
})

$("input[type='file']").change(function(){
   $('#val').text(this.value.replace(/C:\\fakepath\\/i, ''))
})
});


/lib/pkp/styles/common.css

Code: Select all
input[type='file'] {
  opacity:0   
}



/templates/author/submit/step2.tpl

Code: Select all

<div id="addSubmissionFile">
<table class="data" width="100%">
<tr>
   <td width="30%" class="label">
      {if $submissionFile}
         {fieldLabel name="submissionFile" key="author.submit.replaceSubmissionFile"}
      {else}
         {fieldLabel name="submissionFile" key="author.submit.uploadSubmissionFile"}
      {/if}
   </td>
   <td width="70%" class="value">

       
      Selecccione Archivo:<input type='file' class="uploadField" name="submissionFile"/>
      <span id='val'></span>      
      <input name="uploadSubmissionFile" type="submit" class="button" value="{translate key="common.upload"}" />
      
<!-- above code -->
      <!--<input type="file" class="uploadField" name="submissionFile" id="submissionFile" /> <input name="uploadSubmissionFile" type="submit" class="button" value="{translate key="common.upload"}" />-->

      {if $currentJournal->getSetting('showEnsuringLink')}<a class="action" href="javascript:openHelp('{get_help_id key="editorial.sectionEditorsRole.review.blindPeerReview" url="true"}')">{translate key="reviewer.article.ensuringBlindReview"}</a>{/if}
   </td>
</tr>


My question is:

This modification in the code of the file upload will not affect other parts of the program later?

Regards Cristian
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: translate button Choosen File

Postby asmecher » Mon Oct 07, 2013 8:26 am

Hi Cristian,

No, I don't think that will have unwanted side-effects -- though I'm not sure I understand why you're working with paths in Javascript; that doesn't seem like a good idea.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: translate button Choosen File

Postby cristianviza » Tue Oct 08, 2013 6:29 am

Hello asmecher.


exist another way to translate that button in ojs? easy way ?

Regards Crisitian
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest