#5159 Add Translation status link on repo_info page at src.fp.o
Merged 2 years ago by ngompa. Opened 2 years ago by suanand.
suanand/pagure transtats  into  master

empty or binary file added
@@ -41,6 +41,10 @@ 

      padding-left: 33px;

      background: url({{ url_for('theme.static', filename='icons/koschei.png')}}?version={{ g.version}}) 0 50% no-repeat;

    }

+   a.transtats button {

+     padding-left: 20px;

+     background: url({{ url_for('theme.static', filename='icons/transtats.png')}}?version={{ g.version}}) 0 50% no-repeat;

+   }

    .projectinfo {

      white-space: pre-wrap;

      white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
@@ -377,6 +381,9 @@ 

                    </a>

                  </div>

  

+                 {% if repo.namespace == 'rpms' %}

+                   <span id="transtats"></span>

+                 {% endif %}

                </div>

              </div>

              {% endif %}
@@ -531,6 +538,18 @@ 

          $("#bodhi_updates").html("<p>Failed to retrieve updates from bodhi</p>");

        }

      });

+ 

+     $.ajax({

+ 	  url: 'https://transtats.fedoraproject.org/api/package/{{ repo.name }}/exist?format=json',

+ 	  type: 'GET',

+ 	  dataType: 'json',

+ 	  success: function(res){

+ 	     console.log(res);

+ 	     if (res[{{ repo.name }}]) {

+               $("#transtats").html("<div class='btn-group'><a class='transtats' href='https://transtats.fedoraproject.org/packages/view/{{ repo.name }}'><button type='button' class='btn btn-sm btn-outline-primary font-weight-bold'>&nbsp;Translation Status</button></a></div>");

+ 	     }

+ 	  }

+     });

    {% endif %}

  

  });

Not sure, this is a bad idea or a good idea.

Proposal: as we have package view for translation status in Transtats,
that can be linked here for better accessibility.
for example, consider anaconda

  • Statistics of latest koji builds (for few fedora releases)
  • Statistics at translation platform: weblate
  • Languages which are out-of-sync, and need attention

thanks!

Signed-off-by: Sundeep Anand suanand@redhat.com

Could you provide some screenshots?

I mean in the context of what this looks like with this PR applied.

rebased onto cc1f2b706d0c802749f3d78b4d27bb35d389a20e

2 years ago

Is there not an icon for the button like the other buttons have?

rebased onto f8ff4a42f9d1f8f075893f1213fd1995cb18958c

2 years ago

actually logo is not finalized yet, however, added the image we use as favicon.

Looks good to me, pending tests...

rebased onto d413e9b

2 years ago

not sure if failing tests belong to this change.

Meh, they don't, merging.

Pull-Request has been merged by ngompa

2 years ago