WordPress.org

GlotPress

Opened 2 years ago

Closed 2 years ago

#185 closed defect (worksforme)

bug in Project -> Source file URL

Reported by: abdessamad idrissi Owned by: somebody
Milestone: Priority: normal
Version: Component: general
Keywords: Cc:

Description

I hosted my code on google and use
http://code.google.com/p/my-project/source/browse/trunk/myfile.php#99
to view the source code.

I set GlotPress to use something like:
http://code.google.com/p/my-project/source/browse/trunk/%file%#%line%

but this leads to a 404 page since GlotPress ommits the "trunk" directory from the URL.

To fix this, i add a dummy directory afetr "trunk", so the Source file URL becomes;
http://code.google.com/p/my-project/source/browse/trunk/dummy/%file%#%line%

Change History (1)

comment:1 nacin2 years ago

  • Priority changed from major to normal
  • Resolution set to worksforme
  • Status changed from new to closed

This works for me:

http://core.trac.wordpress.org/browser/trunk/%file%#L%line%

GlotPress does a very simple str_replace() to make this work; it does not strip /trunk/:

str_replace( array('%file%', '%line%'), array($file, $line), $this->source_url_template() );

So I am thinking your setting is not configured properly.

Note: See TracTickets for help on using tickets.