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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

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: 60
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: 7717
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: 60
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 2 guests

cron