lib/middlemac/private.rb
#--------------------------------------------------------
# Given an main asset path, such as :partials_dir,
# return the localized version of that path for the
# given resource. This does _not_ convert entire paths;
# it merely takes, e.g.,
# /Resources/SharedGlobalAssets/images and turns it into
# /Resources/en.lproj/assets/images.
#
# @param [String] asset_path The base resource path to
#   convert.
# @param [Sitemap::Resource] resource A resource in the
#   locale of interest.
#
# @!visibility private
#--------------------------------------------------------
Given an main asset path, such as :partials_dir,
return the localized version of that path for the
given resource.
Given an main asset path such as : partials_dir return the localized version of that path for the given resource .
def localized_asset_path(asset_path, resource)
    components = Pathname.new(asset_path).each_filename.to_a
    lproj = "#{resource.hb_locale}.lproj"
    File.join(components[0], lproj, 'assets', components[-1])
  end
def localized_asset_path ( asset_path , resource ) components = Pathname . new ( asset_path ) . each_filename . to_a lproj = "#{resource.hb_locale}.lproj" File . join ( components [ 0 ] , lproj , 'assets' , components [ - 1 ] ) end
Given an main asset path, such as :partials_dir,
return the localized version of that path for the
given resource.
Given an main asset path such as : partials_dir return the localized version of that path for the given resource .
asset_path
<not_specific>
resource
<not_specific>
<not_specific>
resource A resource in the locale of interest.
resource A resource in the locale of interest .
!visibility
None