Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[CAP] Fiori Elements – Add i18n label for bound action

It took me some time to figure out, how I can provide a label for an action parameter.

I try to separate all my translations in label.cds file. This means, the annotations are not placed where the entities or actions are defined. If you have the action definition and the label annotations in one file, you could simply do the following for an action:

trip-service.cds

    entity Trip as projection on db.Trip
        actions {
            action approval();
            action rejection(reason: String @title: '{i18n>reason});
        };

But if you separate both, you need to access somehow the defined action to add the annotation. Following a short snippet, how it works. The important part is, that you have to write a complete new annotation block for your actions.

trip-service.cds without label

service tripService @(requires: 'authenticated-user') {

    entity Trip as projection on db.Trip
        actions {
            action approval();
            action rejection(reason: String);
        };

}

label.cds

using my.namespace as db from '../db/index';
using tripService from '../srv/trip-service';

annotate db.Trip with @title: '{i18n>trips}' {
    description   @title      : '{i18n>description}';
    status        @title      : '{i18n>status}';
    // etc.
}

// solution
annotate tripService.Trip actions {
    rejection(reason @titlel: '{i18n>reason}' )
}

[YouTube] ReVanced Disable AI Translation

Just learned from here, that you can get rid of those super annoying AI translations on YouTube ReVanced by changing the following settings:

ReVanced Settings → Miscellaneous → Spoof Video Streams → Standard Client → Android VR → Standard Audio Language for VR → Select an uncommon language like Tamil, which is not supported

It seems like, if it can’t translate to the chosen one, it uses the default language as “fallback”.

I really wonder why YouTube does this. Does this AI autodub feature really lead to higher view counts? I can’t believe that.