Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      OpenProject ID Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. A unique code for Russian localization

A unique code for Russian localization

Added by Serg Baranov 5 days ago

Can you tell me why there is a separate banner for Russian localization?
app/views/custom_styles/_inline_css_logo.erb

<style type="text/css">

  <%

  isRu = I18n.locale == :ru

  logo_url = if isRu

               asset_path("logo-white-bg-ua.png")

             else

               asset_path("logo_openproject_white_big.png")

             end

  high_contrast_logo_url = if isRu

                             asset_path("logo-black-bg-ua.png")

                           else

                             asset_path("logo_openproject.png")

                           end

  high_contrast_bim_logo_url = asset_path("bim/logo_openproject_bim_big_coloured.png")

  if apply_custom_styles?

    if CustomStyle.current.logo.present?

      logo_url = custom_style_logo_path(digest: CustomStyle.current.digest, filename: CustomStyle.current.logo_identifier)

    elsif CustomStyle.current.theme_logo.present?

      logo_url = asset_path(CustomStyle.current.theme_logo)

    end

        if isRu && logo_url == asset_path("logo_openproject.png")

      logo_url = asset_path("logo-black-bg-ua.png")

    end

  end

  %>


Loading...