特定のトピックをカテゴリにリダイレクトする方法

解決策をまとめたのですが、機能しているようです。正しく行いましたか、それともひどいことをしていますか? :see_no_evil:

<script type="text/discourse-plugin" version="0.8"> 
    // トピックルートを変更します。 
    api.modifyClass('route:topic', {
    
      beforeModel( transition ) {
        var params = this.paramsFor('topic');

        // 英語
        if( params['id'] == 123 ) {
          this.router.transitionTo('/c/tutorials/english/29'); // 暗黙的に進行中の遷移を中止します。
        }
        
        // フランス語
        if( params['id'] == 456 ) {
          this.router.transitionTo('/c/tutorials/french/30'); // 暗黙的に進行中の遷移を中止します。
        }
                
      }
    
    });
</script>